This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +29
-2
lines changed Expand file tree Collapse file tree 4 files changed +29
-2
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ llvm-config = "{llvm_config}"
9696 "tests/pretty" ,
9797 "tests/run-pass-valgrind" ,
9898 "tests/ui" ,
99- "tests/crases " ,
99+ "tests/crashes " ,
100100 ] ;
101101 for test_path in env. skipped_tests ( ) {
102102 args. extend ( [ "--skip" , test_path] ) ;
Original file line number Diff line number Diff line change 1+ //@ compile-flags: -Zpolymorphize=on -Zinline-mir=yes
2+ //@ known-bug: #12345
3+
4+
5+ use std:: sync:: { Arc , Context , Weak } ;
6+
7+ pub struct WeakOnce < T > ( ) ;
8+ impl < T > WeakOnce < T > {
9+ extern "rust-call" fn try_get ( & self ) -> Option < Arc < T > > { }
10+
11+ pub fn get ( & self ) -> Arc < T > {
12+ self . try_get ( )
13+ . unwrap_or_else ( || panic ! ( "Singleton {} not available" , std:: any:: type_name:: <T >( ) ) )
14+ }
15+ }
Original file line number Diff line number Diff line change 1+ This is serves as a collection of crashes so that accidental ICE fixes are tracked.
2+ This was formally done at https://github.com/rust-lang/glacier but doing it inside
3+ the rustc testsuite is more convenient.
4+
5+ It is imperative that a test in the suite causes an internal compiler error/panic
6+ or makes rustc crash in some other way.
7+ Accepted exit codes are: 101 (may be expanded later)
8+
9+ When adding crashes from https://github.com/rust-lang/rust/issues , the
10+ issue number should be noted in the file name (12345.rs should suffice)
11+ and perhaps also inside the file via ` //@ known-bug #4321 `
12+
13+ If you happen to fix one of the crashes, please move it to ` tests/ui ` ! :)
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments