File tree Expand file tree Collapse file tree 2 files changed +26
-25
lines changed
branches/stable/src/test/compile-fail Expand file tree Collapse file tree 2 files changed +26
-25
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ refs/heads/tmp: afae2ff723393b3ab4ccffef6ac7c6d1809e2da0
29
29
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
30
30
refs/tags/homu-tmp: f859507de8c410b648d934d8f5ec1c52daac971d
31
31
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32
- refs/heads/stable: 2d68d09b4679018d0ba3faf41d239251991bf17b
32
+ refs/heads/stable: d066a7b5069ff857a5bffe7cb5168fe63158144f
33
33
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
34
34
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
35
35
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e
Original file line number Diff line number Diff line change @@ -45,29 +45,30 @@ fn main() {
45
45
} ) ;
46
46
47
47
48
- // Note: For implementation simplicity I have chosen to just have
49
- // the stack do "saturated pop", but perhaps we would prefer to
50
- // have cases like these two here be errors:
51
-
52
- pop_unsafe ! { g( ) } ;
53
-
54
- push_unsafe ! ( {
55
- pop_unsafe!( pop_unsafe!{ g( ) } )
56
- } ) ;
57
-
58
-
59
- // Okay, back to examples that do error, even in the presence of
60
- // "saturated pop"
61
-
62
- push_unsafe ! ( {
63
- g( ) ;
64
- pop_unsafe!( pop_unsafe!( {
65
- f( ) //~ ERROR: call to unsafe function
66
- } ) )
67
- } ) ;
68
-
69
- pop_unsafe ! ( {
70
- f( ) ; //~ ERROR: call to unsafe function
71
- } )
48
+ // Note: For implementation simplicity the compiler just
49
+ // ICE's if you underflow the push_unsafe stack.
50
+ //
51
+ // Thus all of the following cases cause an ICE.
52
+ //
53
+ // (The "ERROR" notes are from an earlier version
54
+ // that used saturated arithmetic rather than checked
55
+ // arithmetic.)
56
+
57
+ // pop_unsafe!{ g() };
58
+ //
59
+ // push_unsafe!({
60
+ // pop_unsafe!(pop_unsafe!{ g() })
61
+ // });
62
+ //
63
+ // push_unsafe!({
64
+ // g();
65
+ // pop_unsafe!(pop_unsafe!({
66
+ // f() // ERROR: call to unsafe function
67
+ // }))
68
+ // });
69
+ //
70
+ // pop_unsafe!({
71
+ // f(); // ERROR: call to unsafe function
72
+ // })
72
73
73
74
}
You can’t perform that action at this time.
0 commit comments