Merge remote-tracking branch 'origin/master' into gen
This commit is contained in:
commit
b31998ec93
103 changed files with 719 additions and 1563 deletions
|
|
@ -6,7 +6,7 @@ error[E0425]: cannot find value `A` in module `namespaced_enums`
|
|||
|
|
||||
help: possible candidate is found in another module, you can import it into scope
|
||||
|
|
||||
12 | use namespaced_enums::Foo::A;
|
||||
14 | use namespaced_enums::Foo::A;
|
||||
|
|
||||
|
||||
error[E0425]: cannot find function `B` in module `namespaced_enums`
|
||||
|
|
@ -17,7 +17,7 @@ error[E0425]: cannot find function `B` in module `namespaced_enums`
|
|||
|
|
||||
help: possible candidate is found in another module, you can import it into scope
|
||||
|
|
||||
12 | use namespaced_enums::Foo::B;
|
||||
14 | use namespaced_enums::Foo::B;
|
||||
|
|
||||
|
||||
error[E0422]: cannot find struct, variant or union type `C` in module `namespaced_enums`
|
||||
|
|
@ -28,7 +28,7 @@ error[E0422]: cannot find struct, variant or union type `C` in module `namespace
|
|||
|
|
||||
help: possible candidate is found in another module, you can import it into scope
|
||||
|
|
||||
12 | use namespaced_enums::Foo::C;
|
||||
14 | use namespaced_enums::Foo::C;
|
||||
|
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ error[E0405]: cannot find trait `OuterTrait` in this scope
|
|||
|
|
||||
help: possible candidate is found in another module, you can import it into scope
|
||||
|
|
||||
16 | use issue_21221_3::outer::OuterTrait;
|
||||
18 | use issue_21221_3::outer::OuterTrait;
|
||||
|
|
||||
|
||||
error: cannot continue compilation due to previous error
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ error[E0405]: cannot find trait `T` in this scope
|
|||
|
|
||||
help: possible candidate is found in another module, you can import it into scope
|
||||
|
|
||||
16 | use issue_21221_4::T;
|
||||
18 | use issue_21221_4::T;
|
||||
|
|
||||
|
||||
error: cannot continue compilation due to previous error
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ error[E0404]: expected trait, found type alias `Foo`
|
|||
|
|
||||
help: possible better candidate is found in another module, you can import it into scope
|
||||
|
|
||||
12 | use issue_3907::Foo;
|
||||
14 | use issue_3907::Foo;
|
||||
|
|
||||
|
||||
error: cannot continue compilation due to previous error
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ error[E0423]: expected value, found struct `Z`
|
|||
|
|
||||
help: possible better candidate is found in another module, you can import it into scope
|
||||
|
|
||||
15 | use m::n::Z;
|
||||
16 | use m::n::Z;
|
||||
|
|
||||
|
||||
error[E0423]: expected value, found struct `S`
|
||||
|
|
@ -24,7 +24,7 @@ error[E0423]: expected value, found struct `S`
|
|||
|
|
||||
help: possible better candidate is found in another module, you can import it into scope
|
||||
|
|
||||
13 | use m::S;
|
||||
15 | use m::S;
|
||||
|
|
||||
|
||||
error[E0423]: expected value, found struct `xcrate::S`
|
||||
|
|
@ -38,7 +38,7 @@ error[E0423]: expected value, found struct `xcrate::S`
|
|||
|
|
||||
help: possible better candidate is found in another module, you can import it into scope
|
||||
|
|
||||
13 | use m::S;
|
||||
15 | use m::S;
|
||||
|
|
||||
|
||||
error[E0603]: tuple struct `Z` is private
|
||||
|
|
|
|||
27
src/test/ui/resolve/use_suggestion_placement.rs
Normal file
27
src/test/ui/resolve/use_suggestion_placement.rs
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
macro_rules! y {
|
||||
() => {}
|
||||
}
|
||||
|
||||
mod m {
|
||||
pub const A: i32 = 0;
|
||||
}
|
||||
|
||||
fn main() {
|
||||
y!();
|
||||
let _ = A;
|
||||
foo();
|
||||
}
|
||||
|
||||
fn foo() {
|
||||
type Dict<K, V> = HashMap<K, V>;
|
||||
}
|
||||
38
src/test/ui/resolve/use_suggestion_placement.stderr
Normal file
38
src/test/ui/resolve/use_suggestion_placement.stderr
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
error[E0425]: cannot find value `A` in this scope
|
||||
--> $DIR/use_suggestion_placement.rs:21:13
|
||||
|
|
||||
21 | let _ = A;
|
||||
| ^ not found in this scope
|
||||
|
|
||||
help: possible candidate is found in another module, you can import it into scope
|
||||
|
|
||||
11 | use m::A;
|
||||
|
|
||||
|
||||
error[E0412]: cannot find type `HashMap` in this scope
|
||||
--> $DIR/use_suggestion_placement.rs:26:23
|
||||
|
|
||||
26 | type Dict<K, V> = HashMap<K, V>;
|
||||
| ^^^^^^^ not found in this scope
|
||||
|
|
||||
help: possible candidates are found in other modules, you can import them into scope
|
||||
|
|
||||
11 | use std::collections::HashMap;
|
||||
|
|
||||
11 | use std::collections::hash_map::HashMap;
|
||||
|
|
||||
|
||||
error[E0091]: type parameter `K` is unused
|
||||
--> $DIR/use_suggestion_placement.rs:26:15
|
||||
|
|
||||
26 | type Dict<K, V> = HashMap<K, V>;
|
||||
| ^ unused type parameter
|
||||
|
||||
error[E0091]: type parameter `V` is unused
|
||||
--> $DIR/use_suggestion_placement.rs:26:18
|
||||
|
|
||||
26 | type Dict<K, V> = HashMap<K, V>;
|
||||
| ^ unused type parameter
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
|
|
@ -2,7 +2,7 @@ error[E0536]: expected 1 cfg-pattern
|
|||
--> $DIR/E0536.rs:11:7
|
||||
|
|
||||
11 | #[cfg(not())] //~ ERROR E0536
|
||||
| ^^^
|
||||
| ^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error[E0537]: invalid predicate `unknown`
|
|||
--> $DIR/E0537.rs:11:7
|
||||
|
|
||||
11 | #[cfg(unknown())] //~ ERROR E0537
|
||||
| ^^^^^^^
|
||||
| ^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,3 @@
|
|||
error[E0577]: expected module, found struct `S`
|
||||
--> $DIR/visibility-ty-params.rs:16:5
|
||||
|
|
||||
16 | m!{ S<u8> } //~ ERROR generic arguments in visibility path
|
||||
| -^^^^
|
||||
| |
|
||||
| did you mean `m`?
|
||||
|
||||
error: generic arguments in visibility path
|
||||
--> $DIR/visibility-ty-params.rs:16:6
|
||||
|
|
||||
|
|
@ -18,5 +10,13 @@ error: generic arguments in visibility path
|
|||
20 | m!{ m<> } //~ ERROR generic arguments in visibility path
|
||||
| ^^
|
||||
|
||||
error[E0577]: expected module, found struct `S`
|
||||
--> $DIR/visibility-ty-params.rs:16:5
|
||||
|
|
||||
16 | m!{ S<u8> } //~ ERROR generic arguments in visibility path
|
||||
| -^^^^
|
||||
| |
|
||||
| did you mean `m`?
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
|
|
|||
26
src/test/ui/union-sized-field.rs
Normal file
26
src/test/ui/union-sized-field.rs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![feature(untagged_unions)]
|
||||
|
||||
union Foo<T: ?Sized> {
|
||||
value: T,
|
||||
}
|
||||
|
||||
struct Foo2<T: ?Sized> {
|
||||
value: T,
|
||||
t: u32,
|
||||
}
|
||||
|
||||
enum Foo3<T: ?Sized> {
|
||||
Value(T),
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
32
src/test/ui/union-sized-field.stderr
Normal file
32
src/test/ui/union-sized-field.stderr
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
error[E0277]: the trait bound `T: std::marker::Sized` is not satisfied
|
||||
--> $DIR/union-sized-field.rs:14:5
|
||||
|
|
||||
14 | value: T,
|
||||
| ^^^^^^^^ `T` does not have a constant size known at compile-time
|
||||
|
|
||||
= help: the trait `std::marker::Sized` is not implemented for `T`
|
||||
= help: consider adding a `where T: std::marker::Sized` bound
|
||||
= note: no field of a union may have a dynamically sized type
|
||||
|
||||
error[E0277]: the trait bound `T: std::marker::Sized` is not satisfied
|
||||
--> $DIR/union-sized-field.rs:18:5
|
||||
|
|
||||
18 | value: T,
|
||||
| ^^^^^^^^ `T` does not have a constant size known at compile-time
|
||||
|
|
||||
= help: the trait `std::marker::Sized` is not implemented for `T`
|
||||
= help: consider adding a `where T: std::marker::Sized` bound
|
||||
= note: only the last field of a struct may have a dynamically sized type
|
||||
|
||||
error[E0277]: the trait bound `T: std::marker::Sized` is not satisfied
|
||||
--> $DIR/union-sized-field.rs:23:11
|
||||
|
|
||||
23 | Value(T),
|
||||
| ^^ `T` does not have a constant size known at compile-time
|
||||
|
|
||||
= help: the trait `std::marker::Sized` is not implemented for `T`
|
||||
= help: consider adding a `where T: std::marker::Sized` bound
|
||||
= note: no field of an enum variant may have a dynamically sized type
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue