Skip to content
Permalink
Browse files

Move one test from run-make-fulldeps to ui

  • Loading branch information...
petrochenkov committed Mar 21, 2019
1 parent 89573b3 commit 6389478d7030f1d807a46599dfb7a0a2ba97a240

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
@@ -1,3 +1,3 @@
#![crate_type = "rlib"]
#![crate_name = "Vec"]

pub fn new(arg1: f32, arg2: ()) {}
@@ -1,5 +1,3 @@
#![crate_type = "rlib"]

pub struct S;

impl S {
@@ -0,0 +1,9 @@
// compile-flags:--extern extern_prelude
// aux-build:extern-prelude.rs

// Extern prelude names are not available by absolute paths

fn main() {
use extern_prelude::S; //~ ERROR unresolved import `extern_prelude`
let s = ::extern_prelude::S; //~ ERROR failed to resolve
}
@@ -0,0 +1,16 @@
error[E0432]: unresolved import `extern_prelude`
--> $DIR/extern-prelude-fail.rs:7:9
|
LL | use extern_prelude::S;
| ^^^^^^^^^^^^^^ maybe a missing `extern crate extern_prelude;`?

error[E0433]: failed to resolve: maybe a missing `extern crate extern_prelude;`?
--> $DIR/extern-prelude-fail.rs:8:15
|
LL | let s = ::extern_prelude::S;
| ^^^^^^^^^^^^^^ maybe a missing `extern crate extern_prelude;`?

error: aborting due to 2 previous errors

Some errors occurred: E0432, E0433.
For more information about an error, try `rustc --explain E0432`.
@@ -0,0 +1,31 @@
// compile-pass
// compile-flags:--extern extern_prelude --extern Vec
// aux-build:extern-prelude.rs
// aux-build:extern-prelude-vec.rs

fn basic() {
// It works
let s = extern_prelude::S;
s.external();
}

fn shadow_mod() {
// Local module shadows `extern_prelude` from extern prelude
mod extern_prelude {
pub struct S;

impl S {
pub fn internal(&self) {}
}
}

let s = extern_prelude::S;
s.internal(); // OK
}

fn shadow_prelude() {
// Extern prelude shadows standard library prelude
let x = Vec::new(0f32, ()); // OK
}

fn main() {}

0 comments on commit 6389478

Please sign in to comment.
You can’t perform that action at this time.