File tree Expand file tree Collapse file tree 1 file changed +15
-7
lines changed Expand file tree Collapse file tree 1 file changed +15
-7
lines changed Original file line number Diff line number Diff line change 77
88 before do
99 visit '/'
10- editor . set ( rust_2018_code )
10+ editor . set ( rust_edition_code )
1111 end
1212
1313 scenario "using the 2015 edition" do
1414 in_advanced_options_menu { select '2015' }
1515 click_on ( "Run" )
1616
1717 within ( :output , :stderr ) do
18- expect ( page ) . to have_content 'unused variable: `async`'
19- expect ( page ) . to_not have_content 'expected identifier, found keyword `async`'
18+ expect ( page ) . to have_content 'cannot find struct, variant or union type `async` in this scope'
2019 end
2120 end
2221
2524 click_on ( "Run" )
2625
2726 within ( :output , :stderr ) do
28- expect ( page ) . to have_content 'expected identifier, found keyword `async`'
29- expect ( page ) . to_not have_content 'unused variable: `async`'
27+ expect ( page ) . to have_content "thread 'main' panicked at 'Box<Any>'"
28+ end
29+ end
30+
31+ scenario "using the 2021 edition" do
32+ in_advanced_options_menu { select '2021' }
33+ click_on ( "Run" )
34+
35+ within ( :output , :stderr ) do
36+ expect ( page ) . to have_content 'format argument must be a string literal' , wait : 10
3037 end
3138 end
3239
3340 def editor
3441 Editor . new ( page )
3542 end
3643
37- def rust_2018_code
44+ def rust_edition_code
3845 <<~EOF
46+ #![allow(non_fmt_panic)]
3947 fn main() {
40- let async = 42;
48+ panic!( async {})
4149 }
4250 EOF
4351 end
You can’t perform that action at this time.
0 commit comments