Skip to content

Commit 2af18a2

Browse files
committed
Fix errors in test/ui
1 parent 2c783c3 commit 2af18a2

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

src/test/ui/hygiene/no_implicit_prelude.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ mod bar {
1313
}
1414
fn f() {
1515
::foo::m!();
16-
println!(); // OK on 2015 edition (at least for now)
16+
println!(); //~ ERROR cannot find macro `print!` in this scope
1717
}
1818
}
1919

src/test/ui/hygiene/no_implicit_prelude.stderr

+10-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ LL | fn f() { ::bar::m!(); }
77
LL | Vec::new(); //~ ERROR failed to resolve
88
| ^^^ use of undeclared type or module `Vec`
99

10+
error: cannot find macro `print!` in this scope
11+
--> $DIR/no_implicit_prelude.rs:16:9
12+
|
13+
LL | println!(); //~ ERROR cannot find macro `print!` in this scope
14+
| ^^^^^^^^^^^
15+
|
16+
= help: have you added the `#[macro_use]` on the module/import?
17+
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
18+
1019
error[E0599]: no method named `clone` found for type `()` in the current scope
1120
--> $DIR/no_implicit_prelude.rs:12:12
1221
|
@@ -20,7 +29,7 @@ LL | ().clone() //~ ERROR no method named `clone` found
2029
= note: the following trait is implemented but not in scope, perhaps add a `use` for it:
2130
`use std::clone::Clone;`
2231

23-
error: aborting due to 2 previous errors
32+
error: aborting due to 3 previous errors
2433

2534
Some errors occurred: E0433, E0599.
2635
For more information about an error, try `rustc --explain E0433`.

src/test/ui/tag-that-dare-not-speak-its-name.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
use std::vec::Vec;
55

66
fn last<T>(v: Vec<&T> ) -> std::option::Option<T> {
7-
panic!();
7+
::std::panic!();
88
}
99

1010
fn main() {

0 commit comments

Comments
 (0)