File tree Expand file tree Collapse file tree 3 files changed +36
-0
lines changed Expand file tree Collapse file tree 3 files changed +36
-0
lines changed Original file line number Diff line number Diff line change 1+ // check-pass 
2+ // compile-flags:--test -Zunstable-options --nocapture 
3+ // normalize-stderr-test: "src/test/rustdoc-ui" -> "$$DIR" 
4+ // normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR" 
5+ // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" 
6+ 
7+ /// ```compile_fail 
8+ /// fn foo() { 
9+ ///     Input: 123 
10+ /// } 
11+ /// ``` 
12+ pub  struct  Foo ; 
Original file line number Diff line number Diff line change 1+ error: struct literal body without path
2+   --> $DIR/nocapture-fail.rs:8:10
3+    |
4+ LL |   fn foo() {
5+    |  __________^
6+ LL | |     Input: 123
7+ LL | | }
8+    | |_^
9+    |
10+ help: you might have forgotten to add the struct literal inside the block
11+    |
12+ LL | fn foo() { SomeStruct {
13+ LL |     Input: 123
14+ LL | } }
15+    |
16+ 
17+ error: aborting due to previous error
18+ 
Original file line number Diff line number Diff line change 1+ 
2+ running 1 test
3+ test $DIR/nocapture-fail.rs - Foo (line 7) - compile fail ... ok
4+ 
5+ test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
6+ 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments