Gate 2015 UI tests
This commit is contained in:
parent
cf8a95590a
commit
b2ab7cf980
445 changed files with 1881 additions and 1405 deletions
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition: 2015
|
||||
//@ compile-flags: --error-format human-annotate-rs -Z unstable-options
|
||||
|
||||
pub fn main() {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0412]: cannot find type `Iter` in this scope
|
||||
--> $DIR/missing-type.rs:4:12
|
||||
--> $DIR/missing-type.rs:5:12
|
||||
|
|
||||
LL | let x: Iter;
|
||||
| ^^^^ not found in this scope
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
// Checks that the #[unsafe(naked)] attribute can be placed on function definitions only.
|
||||
//
|
||||
//@ needs-asm-support
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `a`
|
||||
--> $DIR/naked-invalid-attr.rs:56:5
|
||||
--> $DIR/naked-invalid-attr.rs:57:5
|
||||
|
|
||||
LL | #[::a]
|
||||
| ^ use of unresolved module or unlinked crate `a`
|
||||
|
||||
error: `#[naked]` attribute cannot be used on crates
|
||||
--> $DIR/naked-invalid-attr.rs:4:1
|
||||
--> $DIR/naked-invalid-attr.rs:5:1
|
||||
|
|
||||
LL | #![unsafe(naked)]
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
|
@ -13,7 +13,7 @@ LL | #![unsafe(naked)]
|
|||
= help: `#[naked]` can only be applied to functions
|
||||
|
||||
error: `#[naked]` attribute cannot be used on foreign functions
|
||||
--> $DIR/naked-invalid-attr.rs:9:5
|
||||
--> $DIR/naked-invalid-attr.rs:10:5
|
||||
|
|
||||
LL | #[unsafe(naked)]
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
@ -21,7 +21,7 @@ LL | #[unsafe(naked)]
|
|||
= help: `#[naked]` can be applied to functions and methods
|
||||
|
||||
error: `#[naked]` attribute cannot be used on structs
|
||||
--> $DIR/naked-invalid-attr.rs:13:1
|
||||
--> $DIR/naked-invalid-attr.rs:14:1
|
||||
|
|
||||
LL | #[unsafe(naked)]
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
@ -29,7 +29,7 @@ LL | #[unsafe(naked)]
|
|||
= help: `#[naked]` can only be applied to functions
|
||||
|
||||
error: `#[naked]` attribute cannot be used on struct fields
|
||||
--> $DIR/naked-invalid-attr.rs:16:5
|
||||
--> $DIR/naked-invalid-attr.rs:17:5
|
||||
|
|
||||
LL | #[unsafe(naked)]
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
@ -37,7 +37,7 @@ LL | #[unsafe(naked)]
|
|||
= help: `#[naked]` can only be applied to functions
|
||||
|
||||
error: `#[naked]` attribute cannot be used on required trait methods
|
||||
--> $DIR/naked-invalid-attr.rs:22:5
|
||||
--> $DIR/naked-invalid-attr.rs:23:5
|
||||
|
|
||||
LL | #[unsafe(naked)]
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
@ -45,7 +45,7 @@ LL | #[unsafe(naked)]
|
|||
= help: `#[naked]` can be applied to functions, inherent methods, provided trait methods, and trait methods in impl blocks
|
||||
|
||||
error: `#[naked]` attribute cannot be used on closures
|
||||
--> $DIR/naked-invalid-attr.rs:51:5
|
||||
--> $DIR/naked-invalid-attr.rs:52:5
|
||||
|
|
||||
LL | #[unsafe(naked)]
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
@ -53,7 +53,7 @@ LL | #[unsafe(naked)]
|
|||
= help: `#[naked]` can be applied to functions and methods
|
||||
|
||||
error[E0736]: attribute incompatible with `#[unsafe(naked)]`
|
||||
--> $DIR/naked-invalid-attr.rs:56:3
|
||||
--> $DIR/naked-invalid-attr.rs:57:3
|
||||
|
|
||||
LL | #[::a]
|
||||
| ^^^ the `::a` attribute is incompatible with `#[unsafe(naked)]`
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
//@ run-pass
|
||||
#![allow(dead_code)]
|
||||
#![allow(unused_mut)]
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
// Test that we reliably check the value of the associated type.
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0271]: type mismatch resolving `<Adapter<I> as Iterator>::Item == Option<T>`
|
||||
--> $DIR/associated-types-issue-20346.rs:34:36
|
||||
--> $DIR/associated-types-issue-20346.rs:35:36
|
||||
|
|
||||
LL | fn test_adapter<T, I: Iterator<Item=Option<T>>>(it: I) {
|
||||
| - found this type parameter
|
||||
|
|
@ -10,14 +10,14 @@ LL | is_iterator_of::<Option<T>, _>(&adapter);
|
|||
| required by a bound introduced by this call
|
||||
|
|
||||
note: expected this to be `Option<T>`
|
||||
--> $DIR/associated-types-issue-20346.rs:23:17
|
||||
--> $DIR/associated-types-issue-20346.rs:24:17
|
||||
|
|
||||
LL | type Item = T;
|
||||
| ^
|
||||
= note: expected enum `Option<T>`
|
||||
found type parameter `T`
|
||||
note: required by a bound in `is_iterator_of`
|
||||
--> $DIR/associated-types-issue-20346.rs:15:34
|
||||
--> $DIR/associated-types-issue-20346.rs:16:34
|
||||
|
|
||||
LL | fn is_iterator_of<A, I: Iterator<Item=A>>(_: &I) {}
|
||||
| ^^^^^^ required by this bound in `is_iterator_of`
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
//@ run-pass
|
||||
#![allow(dead_code)]
|
||||
#![allow(unused_imports)]
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
//@ check-pass
|
||||
|
||||
#![allow(deprecated)]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
// Regression test for the projection bug in <https://github.com/rust-lang/rust/issues/123953>
|
||||
//
|
||||
//@ edition: 2015
|
||||
//@ compile-flags: -Zincremental-verify-ich=yes
|
||||
//@ incremental
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
error: expected identifier, found `}`
|
||||
--> $DIR/projection-dyn-associated-type.rs:26:1
|
||||
--> $DIR/projection-dyn-associated-type.rs:27:1
|
||||
|
|
||||
LL | }
|
||||
| ^ expected identifier
|
||||
|
||||
warning: trait objects without an explicit `dyn` are deprecated
|
||||
--> $DIR/projection-dyn-associated-type.rs:13:28
|
||||
--> $DIR/projection-dyn-associated-type.rs:14:28
|
||||
|
|
||||
LL | impl<T: ?Sized> Mirror for A {
|
||||
| ^
|
||||
|
|
@ -24,31 +24,31 @@ LL + impl<T: ?Sized, U: A> Mirror for U {
|
|||
|
|
||||
|
||||
error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates
|
||||
--> $DIR/projection-dyn-associated-type.rs:13:6
|
||||
--> $DIR/projection-dyn-associated-type.rs:14:6
|
||||
|
|
||||
LL | impl<T: ?Sized> Mirror for A {
|
||||
| ^ unconstrained type parameter
|
||||
|
||||
error[E0277]: the trait bound `(dyn B + 'static): Mirror` is not satisfied
|
||||
--> $DIR/projection-dyn-associated-type.rs:22:6
|
||||
--> $DIR/projection-dyn-associated-type.rs:23:6
|
||||
|
|
||||
LL | ) -> &'a <dyn B + 'static as Mirror>::Assoc {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Mirror` is not implemented for `(dyn B + 'static)`
|
||||
|
|
||||
help: the trait `Mirror` is implemented for `dyn A`
|
||||
--> $DIR/projection-dyn-associated-type.rs:13:1
|
||||
--> $DIR/projection-dyn-associated-type.rs:14:1
|
||||
|
|
||||
LL | impl<T: ?Sized> Mirror for A {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0277]: the trait bound `(dyn B + 'static): Mirror` is not satisfied
|
||||
--> $DIR/projection-dyn-associated-type.rs:22:6
|
||||
--> $DIR/projection-dyn-associated-type.rs:23:6
|
||||
|
|
||||
LL | ) -> &'a <dyn B + 'static as Mirror>::Assoc {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Mirror` is not implemented for `(dyn B + 'static)`
|
||||
|
|
||||
help: the trait `Mirror` is implemented for `dyn A`
|
||||
--> $DIR/projection-dyn-associated-type.rs:13:1
|
||||
--> $DIR/projection-dyn-associated-type.rs:14:1
|
||||
|
|
||||
LL | impl<T: ?Sized> Mirror for A {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
// Non-builtin attributes do not mess with field visibility resolution (issue #67006).
|
||||
|
||||
mod internal {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `nonexistent`
|
||||
--> $DIR/field-attributes-vis-unresolved.rs:17:12
|
||||
--> $DIR/field-attributes-vis-unresolved.rs:18:12
|
||||
|
|
||||
LL | pub(in nonexistent) field: u8
|
||||
| ^^^^^^^^^^^ use of unresolved module or unlinked crate `nonexistent`
|
||||
|
|
@ -10,7 +10,7 @@ LL + extern crate nonexistent;
|
|||
|
|
||||
|
||||
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `nonexistent`
|
||||
--> $DIR/field-attributes-vis-unresolved.rs:22:12
|
||||
--> $DIR/field-attributes-vis-unresolved.rs:23:12
|
||||
|
|
||||
LL | pub(in nonexistent) u8
|
||||
| ^^^^^^^^^^^ use of unresolved module or unlinked crate `nonexistent`
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
//@ run-pass
|
||||
// Parsing of range patterns
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
//@ dont-require-annotations: NOTE
|
||||
|
||||
mod a {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0308]: mismatched types
|
||||
--> $DIR/issue-13624.rs:9:5
|
||||
--> $DIR/issue-13624.rs:10:5
|
||||
|
|
||||
LL | pub fn get_enum_struct_variant() -> () {
|
||||
| -- expected `()` because of return type
|
||||
|
|
@ -7,7 +7,7 @@ LL | Enum::EnumStructVariant { x: 1, y: 2, z: 3 }
|
|||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found `Enum`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/issue-13624.rs:22:9
|
||||
--> $DIR/issue-13624.rs:23:9
|
||||
|
|
||||
LL | match enum_struct_variant {
|
||||
| ------------------- this expression has type `()`
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
// Issue https://github.com/rust-lang/rust/issues/123414
|
||||
trait MemoryUnit {
|
||||
extern "C" fn read_word(&mut self) -> u8;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
warning: anonymous parameters are deprecated and will be removed in the next edition
|
||||
--> $DIR/trait-impl-argument-difference-ice.rs:4:30
|
||||
--> $DIR/trait-impl-argument-difference-ice.rs:5:30
|
||||
|
|
||||
LL | extern "C" fn read_dword(Self::Assoc<'_>) -> u16;
|
||||
| ^^^^^^^^^^^^^^^ help: try naming the parameter or explicitly ignoring it: `_: Self::Assoc<'_>`
|
||||
|
|
@ -9,7 +9,7 @@ LL | extern "C" fn read_dword(Self::Assoc<'_>) -> u16;
|
|||
= note: `#[warn(anonymous_parameters)]` (part of `#[warn(rust_2018_compatibility)]`) on by default
|
||||
|
||||
error[E0185]: method `read_dword` has a `&self` declaration in the impl, but not in the trait
|
||||
--> $DIR/trait-impl-argument-difference-ice.rs:14:5
|
||||
--> $DIR/trait-impl-argument-difference-ice.rs:15:5
|
||||
|
|
||||
LL | extern "C" fn read_dword(Self::Assoc<'_>) -> u16;
|
||||
| ------------------------------------------------- trait method declared without `&self`
|
||||
|
|
@ -18,7 +18,7 @@ LL | extern "C" fn read_dword(&'_ self) -> u16 {
|
|||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `&self` used in impl
|
||||
|
||||
error[E0046]: not all trait items implemented, missing: `read_word`
|
||||
--> $DIR/trait-impl-argument-difference-ice.rs:12:1
|
||||
--> $DIR/trait-impl-argument-difference-ice.rs:13:1
|
||||
|
|
||||
LL | extern "C" fn read_word(&mut self) -> u8;
|
||||
| ----------------------------------------- `read_word` from trait
|
||||
|
|
@ -27,13 +27,13 @@ LL | impl MemoryUnit for ROM {
|
|||
| ^^^^^^^^^^^^^^^^^^^^^^^ missing `read_word` in implementation
|
||||
|
||||
error[E0220]: associated type `Assoc` not found for `Self`
|
||||
--> $DIR/trait-impl-argument-difference-ice.rs:4:36
|
||||
--> $DIR/trait-impl-argument-difference-ice.rs:5:36
|
||||
|
|
||||
LL | extern "C" fn read_dword(Self::Assoc<'_>) -> u16;
|
||||
| ^^^^^ associated type `Assoc` not found
|
||||
|
||||
error[E0596]: cannot borrow `*self` as mutable, as it is behind a `&` reference
|
||||
--> $DIR/trait-impl-argument-difference-ice.rs:16:19
|
||||
--> $DIR/trait-impl-argument-difference-ice.rs:17:19
|
||||
|
|
||||
LL | let a16 = self.read_word() as u16;
|
||||
| ^^^^ `self` is a `&` reference, so it cannot be borrowed as mutable
|
||||
|
|
@ -44,7 +44,7 @@ LL | extern "C" fn read_dword(&'_ mut self) -> u16 {
|
|||
| +++
|
||||
|
||||
error[E0596]: cannot borrow `*self` as mutable, as it is behind a `&` reference
|
||||
--> $DIR/trait-impl-argument-difference-ice.rs:18:19
|
||||
--> $DIR/trait-impl-argument-difference-ice.rs:19:19
|
||||
|
|
||||
LL | let b16 = self.read_word() as u16;
|
||||
| ^^^^ `self` is a `&` reference, so it cannot be borrowed as mutable
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
// Tests that methods that implement a trait cannot be invoked
|
||||
// unless the trait is imported.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0599]: no method named `the_fn` found for reference `&TheStruct` in the current scope
|
||||
--> $DIR/coherence_inherent.rs:31:11
|
||||
--> $DIR/coherence_inherent.rs:32:11
|
||||
|
|
||||
LL | s.the_fn();
|
||||
| ^^^^^^ method not found in `&TheStruct`
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
//@ aux-build:coherence_inherent_cc_lib.rs
|
||||
|
||||
// Tests that methods that implement a trait cannot be invoked
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0599]: no method named `the_fn` found for reference `&TheStruct` in the current scope
|
||||
--> $DIR/coherence_inherent_cc.rs:23:11
|
||||
--> $DIR/coherence_inherent_cc.rs:24:11
|
||||
|
|
||||
LL | s.the_fn();
|
||||
| ^^^^^^ method not found in `&TheStruct`
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
#![feature(cfg_accessible)]
|
||||
|
||||
mod m {
|
||||
|
|
|
|||
|
|
@ -1,23 +1,23 @@
|
|||
error[E0425]: cannot find value `ExistingPrivate` in this scope
|
||||
--> $DIR/cfg_accessible.rs:52:5
|
||||
--> $DIR/cfg_accessible.rs:53:5
|
||||
|
|
||||
LL | ExistingPrivate;
|
||||
| ^^^^^^^^^^^^^^^ not found in this scope
|
||||
|
|
||||
note: unit struct `m::ExistingPrivate` exists but is inaccessible
|
||||
--> $DIR/cfg_accessible.rs:5:5
|
||||
--> $DIR/cfg_accessible.rs:6:5
|
||||
|
|
||||
LL | struct ExistingPrivate;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ not accessible
|
||||
|
||||
error[E0425]: cannot find value `NonExistingPrivate` in this scope
|
||||
--> $DIR/cfg_accessible.rs:53:5
|
||||
--> $DIR/cfg_accessible.rs:54:5
|
||||
|
|
||||
LL | NonExistingPrivate;
|
||||
| ^^^^^^^^^^^^^^^^^^ not found in this scope
|
||||
|
||||
error[E0425]: cannot find value `NonExistingTraitAlias` in this scope
|
||||
--> $DIR/cfg_accessible.rs:54:5
|
||||
--> $DIR/cfg_accessible.rs:55:5
|
||||
|
|
||||
LL | NonExistingTraitAlias;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ not found in this scope
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
#![feature(associated_const_equality)]
|
||||
|
||||
pub enum Mode {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0573]: expected type, found variant `Mode::Cool`
|
||||
--> $DIR/assoc_const_eq_diagnostic.rs:11:35
|
||||
--> $DIR/assoc_const_eq_diagnostic.rs:12:35
|
||||
|
|
||||
LL | pub trait CoolStuff: Parse<MODE = Mode::Cool> {}
|
||||
| ^^^^^^^^^^
|
||||
|
|
@ -8,7 +8,7 @@ LL | pub trait CoolStuff: Parse<MODE = Mode::Cool> {}
|
|||
| help: try using the variant's enum: `Mode`
|
||||
|
||||
error[E0573]: expected type, found variant `Mode::Cool`
|
||||
--> $DIR/assoc_const_eq_diagnostic.rs:17:17
|
||||
--> $DIR/assoc_const_eq_diagnostic.rs:18:17
|
||||
|
|
||||
LL | fn no_help() -> Mode::Cool {}
|
||||
| ^^^^^^^^^^
|
||||
|
|
@ -17,7 +17,7 @@ LL | fn no_help() -> Mode::Cool {}
|
|||
| help: try using the variant's enum: `Mode`
|
||||
|
||||
error: expected constant, found type
|
||||
--> $DIR/assoc_const_eq_diagnostic.rs:11:35
|
||||
--> $DIR/assoc_const_eq_diagnostic.rs:12:35
|
||||
|
|
||||
LL | pub trait CoolStuff: Parse<MODE = Mode::Cool> {}
|
||||
| ---- ^^^^^^^^^^ unexpected type
|
||||
|
|
@ -25,7 +25,7 @@ LL | pub trait CoolStuff: Parse<MODE = Mode::Cool> {}
|
|||
| expected a constant because of this associated constant
|
||||
|
|
||||
note: the associated constant is defined here
|
||||
--> $DIR/assoc_const_eq_diagnostic.rs:8:5
|
||||
--> $DIR/assoc_const_eq_diagnostic.rs:9:5
|
||||
|
|
||||
LL | const MODE: Mode;
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
@ -35,7 +35,7 @@ LL | pub trait CoolStuff: Parse<MODE = { Mode::Cool }> {}
|
|||
| + +
|
||||
|
||||
error: expected constant, found type
|
||||
--> $DIR/assoc_const_eq_diagnostic.rs:11:35
|
||||
--> $DIR/assoc_const_eq_diagnostic.rs:12:35
|
||||
|
|
||||
LL | pub trait CoolStuff: Parse<MODE = Mode::Cool> {}
|
||||
| ---- ^^^^^^^^^^ unexpected type
|
||||
|
|
@ -43,7 +43,7 @@ LL | pub trait CoolStuff: Parse<MODE = Mode::Cool> {}
|
|||
| expected a constant because of this associated constant
|
||||
|
|
||||
note: the associated constant is defined here
|
||||
--> $DIR/assoc_const_eq_diagnostic.rs:8:5
|
||||
--> $DIR/assoc_const_eq_diagnostic.rs:9:5
|
||||
|
|
||||
LL | const MODE: Mode;
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
@ -54,7 +54,7 @@ LL | pub trait CoolStuff: Parse<MODE = { Mode::Cool }> {}
|
|||
| + +
|
||||
|
||||
error: expected constant, found type
|
||||
--> $DIR/assoc_const_eq_diagnostic.rs:11:35
|
||||
--> $DIR/assoc_const_eq_diagnostic.rs:12:35
|
||||
|
|
||||
LL | pub trait CoolStuff: Parse<MODE = Mode::Cool> {}
|
||||
| ---- ^^^^^^^^^^ unexpected type
|
||||
|
|
@ -62,7 +62,7 @@ LL | pub trait CoolStuff: Parse<MODE = Mode::Cool> {}
|
|||
| expected a constant because of this associated constant
|
||||
|
|
||||
note: the associated constant is defined here
|
||||
--> $DIR/assoc_const_eq_diagnostic.rs:8:5
|
||||
--> $DIR/assoc_const_eq_diagnostic.rs:9:5
|
||||
|
|
||||
LL | const MODE: Mode;
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
#![feature(adt_const_params)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0573]: expected type, found variant `CompileFlag::A`
|
||||
--> $DIR/invalid-enum.rs:23:12
|
||||
--> $DIR/invalid-enum.rs:24:12
|
||||
|
|
||||
LL | test_1::<CompileFlag::A>();
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
@ -8,7 +8,7 @@ LL | test_1::<CompileFlag::A>();
|
|||
| help: try using the variant's enum: `CompileFlag`
|
||||
|
||||
error[E0573]: expected type, found variant `CompileFlag::A`
|
||||
--> $DIR/invalid-enum.rs:27:15
|
||||
--> $DIR/invalid-enum.rs:28:15
|
||||
|
|
||||
LL | test_2::<_, CompileFlag::A>(0);
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
@ -17,7 +17,7 @@ LL | test_2::<_, CompileFlag::A>(0);
|
|||
| help: try using the variant's enum: `CompileFlag`
|
||||
|
||||
error[E0573]: expected type, found variant `CompileFlag::A`
|
||||
--> $DIR/invalid-enum.rs:31:18
|
||||
--> $DIR/invalid-enum.rs:32:18
|
||||
|
|
||||
LL | let _: Example<CompileFlag::A, _> = Example { x: 0 };
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
@ -26,7 +26,7 @@ LL | let _: Example<CompileFlag::A, _> = Example { x: 0 };
|
|||
| help: try using the variant's enum: `CompileFlag`
|
||||
|
||||
error[E0747]: unresolved item provided when a constant was expected
|
||||
--> $DIR/invalid-enum.rs:23:12
|
||||
--> $DIR/invalid-enum.rs:24:12
|
||||
|
|
||||
LL | test_1::<CompileFlag::A>();
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
@ -37,7 +37,7 @@ LL | test_1::<{ CompileFlag::A }>();
|
|||
| + +
|
||||
|
||||
error[E0747]: unresolved item provided when a constant was expected
|
||||
--> $DIR/invalid-enum.rs:27:15
|
||||
--> $DIR/invalid-enum.rs:28:15
|
||||
|
|
||||
LL | test_2::<_, CompileFlag::A>(0);
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
@ -48,7 +48,7 @@ LL | test_2::<_, { CompileFlag::A }>(0);
|
|||
| + +
|
||||
|
||||
error[E0747]: unresolved item provided when a constant was expected
|
||||
--> $DIR/invalid-enum.rs:31:18
|
||||
--> $DIR/invalid-enum.rs:32:18
|
||||
|
|
||||
LL | let _: Example<CompileFlag::A, _> = Example { x: 0 };
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
@ -59,7 +59,7 @@ LL | let _: Example<{ CompileFlag::A }, _> = Example { x: 0 };
|
|||
| + +
|
||||
|
||||
error[E0747]: type provided when a constant was expected
|
||||
--> $DIR/invalid-enum.rs:35:18
|
||||
--> $DIR/invalid-enum.rs:36:18
|
||||
|
|
||||
LL | let _: Example<Example::ASSOC_FLAG, _> = Example { x: 0 };
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
#![feature(generic_const_exprs)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0433]: failed to resolve: use of undeclared type `IntoIter`
|
||||
--> $DIR/issue-82956.rs:25:24
|
||||
--> $DIR/issue-82956.rs:26:24
|
||||
|
|
||||
LL | let mut iter = IntoIter::new(self);
|
||||
| ^^^^^^^^ use of undeclared type `IntoIter`
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
// ICE: ImmTy { imm: Scalar(alloc1), ty: *const dyn Sync } input to a fat-to-thin cast (*const dyn Sync -> *const usize
|
||||
// or with -Zextra-const-ub-checks: expected wide pointer extra data (e.g. slice length or trait object vtable)
|
||||
// issue: rust-lang/rust#121413
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0433]: failed to resolve: use of undeclared type `AtomicUsize`
|
||||
--> $DIR/const_refs_to_static-ice-121413.rs:8:24
|
||||
--> $DIR/const_refs_to_static-ice-121413.rs:9:24
|
||||
|
|
||||
LL | static FOO: Sync = AtomicUsize::new(0);
|
||||
| ^^^^^^^^^^^ use of undeclared type `AtomicUsize`
|
||||
|
|
@ -10,7 +10,7 @@ LL + use std::sync::atomic::AtomicUsize;
|
|||
|
|
||||
|
||||
warning: trait objects without an explicit `dyn` are deprecated
|
||||
--> $DIR/const_refs_to_static-ice-121413.rs:8:17
|
||||
--> $DIR/const_refs_to_static-ice-121413.rs:9:17
|
||||
|
|
||||
LL | static FOO: Sync = AtomicUsize::new(0);
|
||||
| ^^^^
|
||||
|
|
@ -24,7 +24,7 @@ LL | static FOO: dyn Sync = AtomicUsize::new(0);
|
|||
| +++
|
||||
|
||||
error[E0277]: the size for values of type `(dyn Sync + 'static)` cannot be known at compilation time
|
||||
--> $DIR/const_refs_to_static-ice-121413.rs:8:5
|
||||
--> $DIR/const_refs_to_static-ice-121413.rs:9:5
|
||||
|
|
||||
LL | static FOO: Sync = AtomicUsize::new(0);
|
||||
| ^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
||||
|
|
|
|||
18
tests/ui/coroutine/async_gen_fn.e2015.stderr
Normal file
18
tests/ui/coroutine/async_gen_fn.e2015.stderr
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
error[E0670]: `async fn` is not permitted in Rust 2015
|
||||
--> $DIR/async_gen_fn.rs:6:1
|
||||
|
|
||||
LL | async gen fn foo() {}
|
||||
| ^^^^^ to use `async fn`, switch to Rust 2018 or later
|
||||
|
|
||||
= help: pass `--edition 2024` to `rustc`
|
||||
= note: for more on editions, read https://doc.rust-lang.org/edition-guide
|
||||
|
||||
error: expected one of `extern`, `fn`, `safe`, or `unsafe`, found `gen`
|
||||
--> $DIR/async_gen_fn.rs:6:7
|
||||
|
|
||||
LL | async gen fn foo() {}
|
||||
| ^^^ expected one of `extern`, `fn`, `safe`, or `unsafe`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0670`.
|
||||
8
tests/ui/coroutine/async_gen_fn.e2018.stderr
Normal file
8
tests/ui/coroutine/async_gen_fn.e2018.stderr
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
error: expected one of `extern`, `fn`, `safe`, or `unsafe`, found `gen`
|
||||
--> $DIR/async_gen_fn.rs:7:7
|
||||
|
|
||||
LL | async gen fn foo() {}
|
||||
| ^^^ expected one of `extern`, `fn`, `safe`, or `unsafe`
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
8
tests/ui/coroutine/async_gen_fn.e2021.stderr
Normal file
8
tests/ui/coroutine/async_gen_fn.e2021.stderr
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
error: expected one of `extern`, `fn`, `safe`, or `unsafe`, found `gen`
|
||||
--> $DIR/async_gen_fn.rs:7:7
|
||||
|
|
||||
LL | async gen fn foo() {}
|
||||
| ^^^ expected one of `extern`, `fn`, `safe`, or `unsafe`
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0658]: gen blocks are experimental
|
||||
--> $DIR/async_gen_fn.rs:4:1
|
||||
--> $DIR/async_gen_fn.rs:6:1
|
||||
|
|
||||
LL | async gen fn foo() {}
|
||||
| ^^^^^^^^^
|
||||
|
|
|
|||
8
tests/ui/coroutine/async_gen_fn.mid.stderr
Normal file
8
tests/ui/coroutine/async_gen_fn.mid.stderr
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
error: expected one of `extern`, `fn`, `safe`, or `unsafe`, found `gen`
|
||||
--> $DIR/async_gen_fn.rs:6:7
|
||||
|
|
||||
LL | async gen fn foo() {}
|
||||
| ^^^ expected one of `extern`, `fn`, `safe`, or `unsafe`
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
|
@ -1,9 +1,12 @@
|
|||
//@ revisions: e2024 none
|
||||
//@ revisions: e2015 mid e2024
|
||||
//@[e2015] edition: 2015
|
||||
//@[mid] edition: 2018..2024
|
||||
//@[e2024] edition: 2024
|
||||
|
||||
async gen fn foo() {}
|
||||
//[none]~^ ERROR: `async fn` is not permitted in Rust 2015
|
||||
//[none]~| ERROR: expected one of `extern`, `fn`, `safe`, or `unsafe`, found `gen`
|
||||
//[e2024]~^^^ ERROR: gen blocks are experimental
|
||||
//[e2015]~^ ERROR: `async fn` is not permitted in Rust 2015
|
||||
//[e2015]~| ERROR: expected one of `extern`, `fn`, `safe`, or `unsafe`, found `gen`
|
||||
//[mid]~^^^ ERROR: expected one of `extern`, `fn`, `safe`, or `unsafe`, found `gen`
|
||||
//[e2024]~^^^^ ERROR: gen blocks are experimental
|
||||
|
||||
fn main() {}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0407]: method `foo3` is not a member of trait `Trait`
|
||||
--> $DIR/explicit-paths.rs:49:9
|
||||
--> $DIR/explicit-paths.rs:50:9
|
||||
|
|
||||
LL | reuse to_reuse::foo3;
|
||||
| ^^^^^^^^^^^^^^^^----^
|
||||
|
|
@ -8,7 +8,7 @@ LL | reuse to_reuse::foo3;
|
|||
| not a member of trait `Trait`
|
||||
|
||||
error[E0407]: method `foo4` is not a member of trait `Trait`
|
||||
--> $DIR/explicit-paths.rs:51:9
|
||||
--> $DIR/explicit-paths.rs:52:9
|
||||
|
|
||||
LL | reuse F::foo4 { &self.0 }
|
||||
| ^^^^^^^^^----^^^^^^^^^^^^
|
||||
|
|
@ -17,49 +17,49 @@ LL | reuse F::foo4 { &self.0 }
|
|||
| not a member of trait `Trait`
|
||||
|
||||
error[E0425]: cannot find function `foo4` in `S`
|
||||
--> $DIR/explicit-paths.rs:27:14
|
||||
--> $DIR/explicit-paths.rs:28:14
|
||||
|
|
||||
LL | reuse S::foo4;
|
||||
| ^^^^ not found in `S`
|
||||
|
||||
error[E0425]: cannot find function `foo4` in `F`
|
||||
--> $DIR/explicit-paths.rs:38:18
|
||||
--> $DIR/explicit-paths.rs:39:18
|
||||
|
|
||||
LL | reuse F::foo4 { &self.0 }
|
||||
| ^^^^ not found in `F`
|
||||
|
|
||||
note: function `fn_to_other::foo4` exists but is inaccessible
|
||||
--> $DIR/explicit-paths.rs:27:5
|
||||
--> $DIR/explicit-paths.rs:28:5
|
||||
|
|
||||
LL | reuse S::foo4;
|
||||
| ^^^^^^^^^^^^^^ not accessible
|
||||
|
||||
error[E0425]: cannot find function `foo4` in `F`
|
||||
--> $DIR/explicit-paths.rs:51:18
|
||||
--> $DIR/explicit-paths.rs:52:18
|
||||
|
|
||||
LL | reuse F::foo4 { &self.0 }
|
||||
| ^^^^ not found in `F`
|
||||
|
|
||||
note: function `fn_to_other::foo4` exists but is inaccessible
|
||||
--> $DIR/explicit-paths.rs:27:5
|
||||
--> $DIR/explicit-paths.rs:28:5
|
||||
|
|
||||
LL | reuse S::foo4;
|
||||
| ^^^^^^^^^^^^^^ not accessible
|
||||
|
||||
error[E0425]: cannot find function `foo4` in `F`
|
||||
--> $DIR/explicit-paths.rs:65:18
|
||||
--> $DIR/explicit-paths.rs:66:18
|
||||
|
|
||||
LL | reuse F::foo4 { &F }
|
||||
| ^^^^ not found in `F`
|
||||
|
|
||||
note: function `fn_to_other::foo4` exists but is inaccessible
|
||||
--> $DIR/explicit-paths.rs:27:5
|
||||
--> $DIR/explicit-paths.rs:28:5
|
||||
|
|
||||
LL | reuse S::foo4;
|
||||
| ^^^^^^^^^^^^^^ not accessible
|
||||
|
||||
error[E0119]: conflicting implementations of trait `Trait` for type `S`
|
||||
--> $DIR/explicit-paths.rs:74:5
|
||||
--> $DIR/explicit-paths.rs:75:5
|
||||
|
|
||||
LL | impl Trait for S {
|
||||
| ---------------- first implementation here
|
||||
|
|
@ -68,7 +68,7 @@ LL | impl Trait for S {
|
|||
| ^^^^^^^^^^^^^^^^ conflicting implementation for `S`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/explicit-paths.rs:61:36
|
||||
--> $DIR/explicit-paths.rs:62:36
|
||||
|
|
||||
LL | trait Trait2 : Trait {
|
||||
| -------------------- found this type parameter
|
||||
|
|
@ -80,24 +80,24 @@ LL | reuse <F as Trait>::foo1 { self }
|
|||
= note: expected reference `&F`
|
||||
found reference `&Self`
|
||||
note: method defined here
|
||||
--> $DIR/explicit-paths.rs:5:8
|
||||
--> $DIR/explicit-paths.rs:6:8
|
||||
|
|
||||
LL | fn foo1(&self, x: i32) -> i32 { x }
|
||||
| ^^^^ -----
|
||||
|
||||
error[E0277]: the trait bound `S2: Trait` is not satisfied
|
||||
--> $DIR/explicit-paths.rs:76:16
|
||||
--> $DIR/explicit-paths.rs:77:16
|
||||
|
|
||||
LL | reuse <S2 as Trait>::foo1;
|
||||
| ^^ unsatisfied trait bound
|
||||
|
|
||||
help: the trait `Trait` is not implemented for `S2`
|
||||
--> $DIR/explicit-paths.rs:73:5
|
||||
--> $DIR/explicit-paths.rs:74:5
|
||||
|
|
||||
LL | struct S2;
|
||||
| ^^^^^^^^^
|
||||
help: the following other types implement trait `Trait`
|
||||
--> $DIR/explicit-paths.rs:10:1
|
||||
--> $DIR/explicit-paths.rs:11:1
|
||||
|
|
||||
LL | impl Trait for F {}
|
||||
| ^^^^^^^^^^^^^^^^ `F`
|
||||
|
|
@ -109,7 +109,7 @@ LL | impl Trait for S {
|
|||
| ^^^^^^^^^^^^^^^^ `S`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/explicit-paths.rs:76:30
|
||||
--> $DIR/explicit-paths.rs:77:30
|
||||
|
|
||||
LL | reuse <S2 as Trait>::foo1;
|
||||
| ^^^^
|
||||
|
|
@ -120,7 +120,7 @@ LL | reuse <S2 as Trait>::foo1;
|
|||
= note: expected reference `&S2`
|
||||
found reference `&S`
|
||||
note: method defined here
|
||||
--> $DIR/explicit-paths.rs:5:8
|
||||
--> $DIR/explicit-paths.rs:6:8
|
||||
|
|
||||
LL | fn foo1(&self, x: i32) -> i32 { x }
|
||||
| ^^^^ -----
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
use Foo; //~ ERROR unresolved
|
||||
|
||||
use Foo1; //~ ERROR unresolved
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
error[E0432]: unresolved import `Foo`
|
||||
--> $DIR/issue-38054-do-not-show-unresolved-names.rs:1:5
|
||||
--> $DIR/issue-38054-do-not-show-unresolved-names.rs:2:5
|
||||
|
|
||||
LL | use Foo;
|
||||
| ^^^ no `Foo` in the root
|
||||
|
||||
error[E0432]: unresolved import `Foo1`
|
||||
--> $DIR/issue-38054-do-not-show-unresolved-names.rs:3:5
|
||||
--> $DIR/issue-38054-do-not-show-unresolved-names.rs:4:5
|
||||
|
|
||||
LL | use Foo1;
|
||||
| ^^^^ no `Foo1` in the root
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
enum PutDown { Set }
|
||||
enum AffixHeart { Set }
|
||||
enum CauseToBe { Set }
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0412]: cannot find type `Set` in this scope
|
||||
--> $DIR/issue-56028-there-is-an-enum-variant.rs:9:15
|
||||
--> $DIR/issue-56028-there-is-an-enum-variant.rs:10:15
|
||||
|
|
||||
LL | fn setup() -> Set { Set }
|
||||
| ^^^ not found in this scope
|
||||
|
|
@ -21,7 +21,7 @@ LL + fn setup() -> PutDown { Set }
|
|||
= and 3 other candidates
|
||||
|
||||
error[E0425]: cannot find value `Set` in this scope
|
||||
--> $DIR/issue-56028-there-is-an-enum-variant.rs:9:21
|
||||
--> $DIR/issue-56028-there-is-an-enum-variant.rs:10:21
|
||||
|
|
||||
LL | fn setup() -> Set { Set }
|
||||
| ^^^ not found in this scope
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
fn main() {
|
||||
const _: Range = 0..1; //~ ERROR cannot find type `Range` in this scope
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0412]: cannot find type `Range` in this scope
|
||||
--> $DIR/sugg-stable-import-first-issue-140240.rs:2:14
|
||||
--> $DIR/sugg-stable-import-first-issue-140240.rs:3:14
|
||||
|
|
||||
LL | const _: Range = 0..1;
|
||||
| ^^^^^ not found in this scope
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
// https://github.com/rust-lang/rust/issues/58734
|
||||
trait Trait {
|
||||
fn exists(self) -> ();
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
warning: trait objects without an explicit `dyn` are deprecated
|
||||
--> $DIR/spurious-dyn-compat-errors-58734.rs:21:5
|
||||
--> $DIR/spurious-dyn-compat-errors-58734.rs:22:5
|
||||
|
|
||||
LL | Trait::nonexistent(());
|
||||
| ^^^^^
|
||||
|
|
@ -13,14 +13,14 @@ LL | <dyn Trait>::nonexistent(());
|
|||
| ++++ +
|
||||
|
||||
error[E0038]: the trait `Trait` is not dyn compatible
|
||||
--> $DIR/spurious-dyn-compat-errors-58734.rs:21:5
|
||||
--> $DIR/spurious-dyn-compat-errors-58734.rs:22:5
|
||||
|
|
||||
LL | Trait::nonexistent(());
|
||||
| ^^^^^ `Trait` is not dyn compatible
|
||||
|
|
||||
note: for a trait to be dyn compatible it needs to allow building a vtable
|
||||
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
|
||||
--> $DIR/spurious-dyn-compat-errors-58734.rs:5:8
|
||||
--> $DIR/spurious-dyn-compat-errors-58734.rs:6:8
|
||||
|
|
||||
LL | trait Trait {
|
||||
| ----- this trait is not dyn compatible...
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
#[derive(Default)]
|
||||
enum E {
|
||||
A {},
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0433]: failed to resolve: `A` is a variant, not a module
|
||||
--> $DIR/assoc-fn-call-on-variant.rs:14:8
|
||||
--> $DIR/assoc-fn-call-on-variant.rs:15:8
|
||||
|
|
||||
LL | E::A::f();
|
||||
| ^ `A` is a variant, not a module
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
// Test that enum variants are not actually types.
|
||||
|
||||
enum Foo {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0573]: expected type, found variant `Foo::Bar`
|
||||
--> $DIR/enum-variant-type-2.rs:7:11
|
||||
--> $DIR/enum-variant-type-2.rs:8:11
|
||||
|
|
||||
LL | fn foo(x: Foo::Bar) {}
|
||||
| ^^^^^^^^
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
use prelude::*; //~ ERROR unresolved import `prelude`
|
||||
|
||||
mod unresolved_env {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error: environment variable `NON_EXISTENT` not defined at compile time
|
||||
--> $DIR/error-recovery-issue-55897.rs:10:22
|
||||
--> $DIR/error-recovery-issue-55897.rs:11:22
|
||||
|
|
||||
LL | include!(concat!(env!("NON_EXISTENT"), "/data.rs"));
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
@ -7,13 +7,13 @@ LL | include!(concat!(env!("NON_EXISTENT"), "/data.rs"));
|
|||
= help: use `std::env::var("NON_EXISTENT")` to read the variable at run time
|
||||
|
||||
error: suffixes on string literals are invalid
|
||||
--> $DIR/error-recovery-issue-55897.rs:15:22
|
||||
--> $DIR/error-recovery-issue-55897.rs:16:22
|
||||
|
|
||||
LL | include!(concat!("NON_EXISTENT"suffix, "/data.rs"));
|
||||
| ^^^^^^^^^^^^^^^^^^^^ invalid suffix `suffix`
|
||||
|
||||
error[E0432]: unresolved import `prelude`
|
||||
--> $DIR/error-recovery-issue-55897.rs:1:5
|
||||
--> $DIR/error-recovery-issue-55897.rs:2:5
|
||||
|
|
||||
LL | use prelude::*;
|
||||
| ^^^^^^^
|
||||
|
|
@ -22,7 +22,7 @@ LL | use prelude::*;
|
|||
| help: a similar path exists: `std::prelude`
|
||||
|
||||
error[E0432]: unresolved import `env`
|
||||
--> $DIR/error-recovery-issue-55897.rs:4:9
|
||||
--> $DIR/error-recovery-issue-55897.rs:5:9
|
||||
|
|
||||
LL | use env;
|
||||
| ^^^ no `env` in the root
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
use something::Foo; //~ ERROR E0432
|
||||
|
||||
fn main () {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0432]: unresolved import `something`
|
||||
--> $DIR/E0432.rs:1:5
|
||||
--> $DIR/E0432.rs:2:5
|
||||
|
|
||||
LL | use something::Foo;
|
||||
| ^^^^^^^^^ use of unresolved module or unlinked crate `something`
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
//@ run-rustfix
|
||||
|
||||
#![allow(unused)] // for rustfix
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
//@ run-rustfix
|
||||
|
||||
#![allow(unused)] // for rustfix
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0642]: patterns aren't allowed in methods without bodies
|
||||
--> $DIR/E0642.rs:9:12
|
||||
--> $DIR/E0642.rs:10:12
|
||||
|
|
||||
LL | fn foo((x, y): (i32, i32));
|
||||
| ^^^^^^
|
||||
|
|
@ -11,7 +11,7 @@ LL + fn foo(_: (i32, i32));
|
|||
|
|
||||
|
||||
error[E0642]: patterns aren't allowed in methods without bodies
|
||||
--> $DIR/E0642.rs:11:12
|
||||
--> $DIR/E0642.rs:12:12
|
||||
|
|
||||
LL | fn bar((x, y): (i32, i32)) {}
|
||||
| ^^^^^^
|
||||
|
|
@ -23,7 +23,7 @@ LL + fn bar(_: (i32, i32)) {}
|
|||
|
|
||||
|
||||
error[E0642]: patterns aren't allowed in methods without bodies
|
||||
--> $DIR/E0642.rs:13:15
|
||||
--> $DIR/E0642.rs:14:15
|
||||
|
|
||||
LL | fn method(S { .. }: S) {}
|
||||
| ^^^^^^^^
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
//@ check-pass
|
||||
|
||||
trait X {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
warning: anonymous parameters are deprecated and will be removed in the next edition
|
||||
--> $DIR/issue-89280-emitter-overflow-splice-lines.rs:4:21
|
||||
--> $DIR/issue-89280-emitter-overflow-splice-lines.rs:5:21
|
||||
|
|
||||
LL | fn test(x: u32, (
|
||||
| _____________________^
|
||||
|
|
|
|||
1
tests/ui/extern/extern-crate-visibility.rs
vendored
1
tests/ui/extern/extern-crate-visibility.rs
vendored
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
mod foo {
|
||||
extern crate core;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
error[E0603]: crate import `core` is private
|
||||
--> $DIR/extern-crate-visibility.rs:6:10
|
||||
--> $DIR/extern-crate-visibility.rs:7:10
|
||||
|
|
||||
LL | use foo::core::cell;
|
||||
| ^^^^ private crate import
|
||||
|
|
||||
note: the crate import `core` is defined here
|
||||
--> $DIR/extern-crate-visibility.rs:2:5
|
||||
--> $DIR/extern-crate-visibility.rs:3:5
|
||||
|
|
||||
LL | extern crate core;
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
|
@ -16,13 +16,13 @@ LL + use std::cell;
|
|||
|
|
||||
|
||||
error[E0603]: crate import `core` is private
|
||||
--> $DIR/extern-crate-visibility.rs:9:10
|
||||
--> $DIR/extern-crate-visibility.rs:10:10
|
||||
|
|
||||
LL | foo::core::cell::Cell::new(0);
|
||||
| ^^^^ private crate import
|
||||
|
|
||||
note: the crate import `core` is defined here
|
||||
--> $DIR/extern-crate-visibility.rs:2:5
|
||||
--> $DIR/extern-crate-visibility.rs:3:5
|
||||
|
|
||||
LL | extern crate core;
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
use core::default; //~ ERROR unresolved import `core`
|
||||
|
||||
fn main() {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0432]: unresolved import `core`
|
||||
--> $DIR/feature-gate-extern_absolute_paths.rs:1:5
|
||||
--> $DIR/feature-gate-extern_absolute_paths.rs:2:5
|
||||
|
|
||||
LL | use core::default;
|
||||
| ^^^^
|
||||
|
|
@ -8,7 +8,7 @@ LL | use core::default;
|
|||
| help: try using `std` instead of `core`: `std`
|
||||
|
||||
error[E0433]: failed to resolve: you might be missing crate `core`
|
||||
--> $DIR/feature-gate-extern_absolute_paths.rs:4:19
|
||||
--> $DIR/feature-gate-extern_absolute_paths.rs:5:19
|
||||
|
|
||||
LL | let _: u8 = ::core::default::Default();
|
||||
| ^^^^ you might be missing crate `core`
|
||||
|
|
|
|||
21
tests/ui/feature-gates/feature-gate-gen_blocks.e2015.stderr
Normal file
21
tests/ui/feature-gates/feature-gate-gen_blocks.e2015.stderr
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `gen`
|
||||
--> $DIR/feature-gate-gen_blocks.rs:15:11
|
||||
|
|
||||
LL | async gen {};
|
||||
| ^^^ expected one of 8 possible tokens
|
||||
|
||||
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `gen`
|
||||
--> $DIR/feature-gate-gen_blocks.rs:29:11
|
||||
|
|
||||
LL | async gen {};
|
||||
| ^^^ expected one of 8 possible tokens
|
||||
|
||||
error[E0422]: cannot find struct, variant or union type `gen` in this scope
|
||||
--> $DIR/feature-gate-gen_blocks.rs:7:5
|
||||
|
|
||||
LL | gen {};
|
||||
| ^^^ not found in this scope
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0422`.
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0658]: gen blocks are experimental
|
||||
--> $DIR/feature-gate-gen_blocks.rs:5:5
|
||||
--> $DIR/feature-gate-gen_blocks.rs:7:5
|
||||
|
|
||||
LL | gen {};
|
||||
| ^^^
|
||||
|
|
@ -9,7 +9,7 @@ LL | gen {};
|
|||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: gen blocks are experimental
|
||||
--> $DIR/feature-gate-gen_blocks.rs:12:5
|
||||
--> $DIR/feature-gate-gen_blocks.rs:15:5
|
||||
|
|
||||
LL | async gen {};
|
||||
| ^^^^^^^^^
|
||||
|
|
@ -19,7 +19,7 @@ LL | async gen {};
|
|||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: gen blocks are experimental
|
||||
--> $DIR/feature-gate-gen_blocks.rs:22:5
|
||||
--> $DIR/feature-gate-gen_blocks.rs:26:5
|
||||
|
|
||||
LL | gen {};
|
||||
| ^^^
|
||||
|
|
@ -29,7 +29,7 @@ LL | gen {};
|
|||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: gen blocks are experimental
|
||||
--> $DIR/feature-gate-gen_blocks.rs:25:5
|
||||
--> $DIR/feature-gate-gen_blocks.rs:29:5
|
||||
|
|
||||
LL | async gen {};
|
||||
| ^^^^^^^^^
|
||||
|
|
@ -39,13 +39,13 @@ LL | async gen {};
|
|||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0282]: type annotations needed
|
||||
--> $DIR/feature-gate-gen_blocks.rs:5:5
|
||||
--> $DIR/feature-gate-gen_blocks.rs:7:5
|
||||
|
|
||||
LL | gen {};
|
||||
| ^^^^^^ cannot infer type
|
||||
|
||||
error[E0282]: type annotations needed
|
||||
--> $DIR/feature-gate-gen_blocks.rs:12:5
|
||||
--> $DIR/feature-gate-gen_blocks.rs:15:5
|
||||
|
|
||||
LL | async gen {};
|
||||
| ^^^^^^^^^^^^ cannot infer type
|
||||
|
|
|
|||
21
tests/ui/feature-gates/feature-gate-gen_blocks.mid.stderr
Normal file
21
tests/ui/feature-gates/feature-gate-gen_blocks.mid.stderr
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
error: expected one of `move`, `use`, `{`, `|`, or `||`, found `gen`
|
||||
--> $DIR/feature-gate-gen_blocks.rs:14:11
|
||||
|
|
||||
LL | async gen {};
|
||||
| ^^^ expected one of `move`, `use`, `{`, `|`, or `||`
|
||||
|
||||
error: expected one of `move`, `use`, `{`, `|`, or `||`, found `gen`
|
||||
--> $DIR/feature-gate-gen_blocks.rs:27:11
|
||||
|
|
||||
LL | async gen {};
|
||||
| ^^^ expected one of `move`, `use`, `{`, `|`, or `||`
|
||||
|
||||
error[E0422]: cannot find struct, variant or union type `gen` in this scope
|
||||
--> $DIR/feature-gate-gen_blocks.rs:7:5
|
||||
|
|
||||
LL | gen {};
|
||||
| ^^^ not found in this scope
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0422`.
|
||||
21
tests/ui/feature-gates/feature-gate-gen_blocks.middle.stderr
Normal file
21
tests/ui/feature-gates/feature-gate-gen_blocks.middle.stderr
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
error: expected one of `move`, `use`, `{`, `|`, or `||`, found `gen`
|
||||
--> $DIR/feature-gate-gen_blocks.rs:15:11
|
||||
|
|
||||
LL | async gen {};
|
||||
| ^^^ expected one of `move`, `use`, `{`, `|`, or `||`
|
||||
|
||||
error: expected one of `move`, `use`, `{`, `|`, or `||`, found `gen`
|
||||
--> $DIR/feature-gate-gen_blocks.rs:29:11
|
||||
|
|
||||
LL | async gen {};
|
||||
| ^^^ expected one of `move`, `use`, `{`, `|`, or `||`
|
||||
|
||||
error[E0422]: cannot find struct, variant or union type `gen` in this scope
|
||||
--> $DIR/feature-gate-gen_blocks.rs:7:5
|
||||
|
|
||||
LL | gen {};
|
||||
| ^^^ not found in this scope
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0422`.
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `gen`
|
||||
--> $DIR/feature-gate-gen_blocks.rs:13:11
|
||||
|
|
||||
LL | async gen {};
|
||||
| ^^^ expected one of 8 possible tokens
|
||||
|
||||
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `gen`
|
||||
--> $DIR/feature-gate-gen_blocks.rs:26:11
|
||||
|
|
||||
LL | async gen {};
|
||||
| ^^^ expected one of 8 possible tokens
|
||||
|
||||
error[E0422]: cannot find struct, variant or union type `gen` in this scope
|
||||
--> $DIR/feature-gate-gen_blocks.rs:6:5
|
||||
|
|
||||
LL | gen {};
|
||||
| ^^^ not found in this scope
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0422`.
|
||||
|
|
@ -1,17 +1,21 @@
|
|||
//@ revisions: e2024 none
|
||||
//@ revisions: e2015 middle e2024
|
||||
//@[e2015] edition: 2015
|
||||
//@[middle] edition: 2018..2024
|
||||
//@[e2024] edition: 2024
|
||||
|
||||
fn test_gen() {
|
||||
gen {};
|
||||
//[none]~^ ERROR: cannot find struct, variant or union type `gen`
|
||||
//[e2024]~^^ ERROR: gen blocks are experimental
|
||||
//[e2015]~^ ERROR: cannot find struct, variant or union type `gen`
|
||||
//[middle]~^^ ERROR: cannot find struct, variant or union type `gen` in this scope
|
||||
//[e2024]~^^^ ERROR: gen blocks are experimental
|
||||
//[e2024]~| ERROR: type annotations needed
|
||||
}
|
||||
|
||||
fn test_async_gen() {
|
||||
async gen {};
|
||||
//[none]~^ ERROR expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `gen`
|
||||
//[e2024]~^^ ERROR: gen blocks are experimental
|
||||
//[e2015]~^ ERROR expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `gen`
|
||||
//[middle]~^^ ERROR: expected one of `move`, `use`, `{`, `|`, or `||`, found `gen`
|
||||
//[e2024]~^^^ ERROR: gen blocks are experimental
|
||||
//[e2024]~| ERROR: type annotations needed
|
||||
}
|
||||
|
||||
|
|
@ -23,6 +27,7 @@ fn foo() {
|
|||
//[e2024]~^ ERROR: gen blocks are experimental
|
||||
|
||||
async gen {};
|
||||
//[e2024]~^ ERROR: gen blocks are experimental
|
||||
//[none]~^^ ERROR expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `gen`
|
||||
//[e2015]~^ ERROR expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `gen`
|
||||
//[middle]~^^ ERROR: expected one of `move`, `use`, `{`, `|`, or `||`, found `gen`
|
||||
//[e2024]~^^^ ERROR: gen blocks are experimental
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
use std::mem::offset_of;
|
||||
|
||||
enum Alpha {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0573]: expected type, found variant `Alpha::One`
|
||||
--> $DIR/feature-gate-offset-of-enum.rs:9:16
|
||||
--> $DIR/feature-gate-offset-of-enum.rs:10:16
|
||||
|
|
||||
LL | offset_of!(Alpha::One, 0);
|
||||
| ^^^^^^^^^^
|
||||
|
|
@ -8,7 +8,7 @@ LL | offset_of!(Alpha::One, 0);
|
|||
| help: try using the variant's enum: `Alpha`
|
||||
|
||||
error[E0658]: using enums in offset_of is experimental
|
||||
--> $DIR/feature-gate-offset-of-enum.rs:10:23
|
||||
--> $DIR/feature-gate-offset-of-enum.rs:11:23
|
||||
|
|
||||
LL | offset_of!(Alpha, One);
|
||||
| ^^^
|
||||
|
|
@ -18,13 +18,13 @@ LL | offset_of!(Alpha, One);
|
|||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0795]: `One` is an enum variant; expected field at end of `offset_of`
|
||||
--> $DIR/feature-gate-offset-of-enum.rs:10:23
|
||||
--> $DIR/feature-gate-offset-of-enum.rs:11:23
|
||||
|
|
||||
LL | offset_of!(Alpha, One);
|
||||
| ^^^ enum variant
|
||||
|
||||
error[E0658]: using enums in offset_of is experimental
|
||||
--> $DIR/feature-gate-offset-of-enum.rs:12:23
|
||||
--> $DIR/feature-gate-offset-of-enum.rs:13:23
|
||||
|
|
||||
LL | offset_of!(Alpha, Two.0);
|
||||
| ^^^
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
// Used to ICE due to a size mismatch between the actual fake signature of `fold` and the
|
||||
// generated signature used reporting the parameter mismatch at the call site.
|
||||
// See issue #135124
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
error: unexpected `self` parameter in function
|
||||
--> $DIR/error-recovery-mismatch.rs:11:29
|
||||
--> $DIR/error-recovery-mismatch.rs:12:29
|
||||
|
|
||||
LL | fn fold<T>(&self, _: T, &self._) {}
|
||||
| ^^^^^ must be the first parameter of an associated function
|
||||
|
||||
error: expected one of `)` or `,`, found `.`
|
||||
--> $DIR/error-recovery-mismatch.rs:11:34
|
||||
--> $DIR/error-recovery-mismatch.rs:12:34
|
||||
|
|
||||
LL | fn fold<T>(&self, _: T, &self._) {}
|
||||
| ^
|
||||
|
|
@ -14,13 +14,13 @@ LL | fn fold<T>(&self, _: T, &self._) {}
|
|||
| help: missing `,`
|
||||
|
||||
error[E0415]: identifier `self` is bound more than once in this parameter list
|
||||
--> $DIR/error-recovery-mismatch.rs:11:30
|
||||
--> $DIR/error-recovery-mismatch.rs:12:30
|
||||
|
|
||||
LL | fn fold<T>(&self, _: T, &self._) {}
|
||||
| ^^^^ used as parameter more than once
|
||||
|
||||
warning: anonymous parameters are deprecated and will be removed in the next edition
|
||||
--> $DIR/error-recovery-mismatch.rs:11:35
|
||||
--> $DIR/error-recovery-mismatch.rs:12:35
|
||||
|
|
||||
LL | fn fold<T>(&self, _: T, &self._) {}
|
||||
| ^ help: try naming the parameter or explicitly ignoring it: `_: _`
|
||||
|
|
@ -30,7 +30,7 @@ LL | fn fold<T>(&self, _: T, &self._) {}
|
|||
= note: `#[warn(anonymous_parameters)]` (part of `#[warn(rust_2018_compatibility)]`) on by default
|
||||
|
||||
error[E0121]: the placeholder `_` is not allowed within types on item signatures for methods
|
||||
--> $DIR/error-recovery-mismatch.rs:11:35
|
||||
--> $DIR/error-recovery-mismatch.rs:12:35
|
||||
|
|
||||
LL | fn fold<T>(&self, _: T, &self._) {}
|
||||
| ^ not allowed in type signatures
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
//@ run-pass
|
||||
|
||||
#![allow(improper_ctypes_definitions)]
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
//@ edition:2015
|
||||
|
||||
#![feature(decl_macro)]
|
||||
#![allow(unused)]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
#![feature(decl_macro)]
|
||||
|
||||
mod foo {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0425]: cannot find function `f` in this scope
|
||||
--> $DIR/globs.rs:22:9
|
||||
--> $DIR/globs.rs:23:9
|
||||
|
|
||||
LL | pub fn g() {}
|
||||
| ---------- similarly named function `g` defined here
|
||||
|
|
@ -18,7 +18,7 @@ LL + use foo::f;
|
|||
|
|
||||
|
||||
error[E0425]: cannot find function `g` in this scope
|
||||
--> $DIR/globs.rs:15:5
|
||||
--> $DIR/globs.rs:16:5
|
||||
|
|
||||
LL | pub fn f() {}
|
||||
| ---------- similarly named function `f` defined here
|
||||
|
|
@ -45,7 +45,7 @@ LL + use bar::g;
|
|||
|
|
||||
|
||||
error[E0425]: cannot find function `f` in this scope
|
||||
--> $DIR/globs.rs:61:12
|
||||
--> $DIR/globs.rs:62:12
|
||||
|
|
||||
LL | n!(f);
|
||||
| -----
|
||||
|
|
@ -62,7 +62,7 @@ LL | n!(f);
|
|||
= note: this error originates in the macro `n` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0425]: cannot find function `f` in this scope
|
||||
--> $DIR/globs.rs:65:17
|
||||
--> $DIR/globs.rs:66:17
|
||||
|
|
||||
LL | n!(f);
|
||||
| -----
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
//@ check-pass
|
||||
|
||||
#![feature(decl_macro)]
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
//@ check-pass
|
||||
|
||||
#![feature(decl_macro)]
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
//@ check-pass
|
||||
#![allow(dead_code)]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
#![feature(decl_macro)]
|
||||
|
||||
mod foo {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0433]: failed to resolve: use of undeclared type `Vec`
|
||||
--> $DIR/no_implicit_prelude.rs:11:9
|
||||
--> $DIR/no_implicit_prelude.rs:12:9
|
||||
|
|
||||
LL | fn f() { ::bar::m!(); }
|
||||
| ----------- in this macro invocation
|
||||
|
|
@ -14,7 +14,7 @@ LL + use std::vec::Vec;
|
|||
|
|
||||
|
||||
error[E0599]: no method named `clone` found for unit type `()` in the current scope
|
||||
--> $DIR/no_implicit_prelude.rs:12:12
|
||||
--> $DIR/no_implicit_prelude.rs:13:12
|
||||
|
|
||||
LL | fn f() { ::bar::m!(); }
|
||||
| ----------- in this macro invocation
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
#![feature(decl_macro)]
|
||||
|
||||
mod foo {
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
error[E0603]: function `f` is private
|
||||
--> $DIR/privacy.rs:16:14
|
||||
--> $DIR/privacy.rs:17:14
|
||||
|
|
||||
LL | foo::f()
|
||||
| ^ private function
|
||||
|
|
||||
note: the function `f` is defined here
|
||||
--> $DIR/privacy.rs:4:5
|
||||
--> $DIR/privacy.rs:5:5
|
||||
|
|
||||
LL | fn f() {}
|
||||
| ^^^^^^
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
#![feature(decl_macro)]
|
||||
|
||||
mod foo {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0599]: no method named `f` found for unit type `()` in the current scope
|
||||
--> $DIR/trait_items.rs:17:24
|
||||
--> $DIR/trait_items.rs:18:24
|
||||
|
|
||||
LL | fn f(&self) {}
|
||||
| - the method is available for `()` here
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
//@ run-pass
|
||||
|
||||
//@ aux-build:xcrate.rs
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
error[E0599]: no method named `my_debug` found for reference `&impl Debug` in the current scope
|
||||
--> $DIR/call_method_on_inherent_impl_on_rigid_type.rs:15:11
|
||||
--> $DIR/call_method_on_inherent_impl_on_rigid_type.rs:16:11
|
||||
|
|
||||
LL | x.my_debug();
|
||||
| ^^^^^^^^ method not found in `&impl Debug`
|
||||
|
|
||||
= help: items from traits can only be used if the trait is implemented and in scope
|
||||
note: `MyDebug` defines an item `my_debug`, perhaps you need to implement it
|
||||
--> $DIR/call_method_on_inherent_impl_on_rigid_type.rs:4:1
|
||||
--> $DIR/call_method_on_inherent_impl_on_rigid_type.rs:5:1
|
||||
|
|
||||
LL | trait MyDebug {
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0599]: no method named `my_debug` found for reference `&_` in the current scope
|
||||
--> $DIR/call_method_on_inherent_impl_on_rigid_type.rs:15:11
|
||||
--> $DIR/call_method_on_inherent_impl_on_rigid_type.rs:16:11
|
||||
|
|
||||
LL | x.my_debug();
|
||||
| ^^^^^^^^ method not found in `&_`
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
//@ revisions: current next
|
||||
//@[next] compile-flags: -Znext-solver
|
||||
//@ edition: 2015
|
||||
|
||||
trait MyDebug {
|
||||
fn my_debug(&self);
|
||||
|
|
|
|||
|
|
@ -1,25 +1,25 @@
|
|||
error[E0599]: no method named `method` found for reference `&impl Sized` in the current scope
|
||||
--> $DIR/would-constrain-opaque.rs:28:11
|
||||
--> $DIR/would-constrain-opaque.rs:29:11
|
||||
|
|
||||
LL | x.method();
|
||||
| ^^^^^^ method not found in `&impl Sized`
|
||||
|
|
||||
= help: items from traits can only be used if the trait is implemented and in scope
|
||||
note: `Trait` defines an item `method`, perhaps you need to implement it
|
||||
--> $DIR/would-constrain-opaque.rs:15:1
|
||||
--> $DIR/would-constrain-opaque.rs:16:1
|
||||
|
|
||||
LL | trait Trait: Sized {
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0599]: no method named `method` found for reference `&impl Sized` in the current scope
|
||||
--> $DIR/would-constrain-opaque.rs:30:11
|
||||
--> $DIR/would-constrain-opaque.rs:31:11
|
||||
|
|
||||
LL | x.method();
|
||||
| ^^^^^^ method not found in `&impl Sized`
|
||||
|
|
||||
= help: items from traits can only be used if the trait is implemented and in scope
|
||||
note: `Trait` defines an item `method`, perhaps you need to implement it
|
||||
--> $DIR/would-constrain-opaque.rs:15:1
|
||||
--> $DIR/would-constrain-opaque.rs:16:1
|
||||
|
|
||||
LL | trait Trait: Sized {
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0599]: no method named `method` found for reference `&_` in the current scope
|
||||
--> $DIR/would-constrain-opaque.rs:28:11
|
||||
--> $DIR/would-constrain-opaque.rs:29:11
|
||||
|
|
||||
LL | x.method();
|
||||
| ^^^^^^ method not found in `&_`
|
||||
|
|
@ -11,7 +11,7 @@ LL + use Trait;
|
|||
|
|
||||
|
||||
error[E0599]: no method named `method` found for reference `&_` in the current scope
|
||||
--> $DIR/would-constrain-opaque.rs:30:11
|
||||
--> $DIR/would-constrain-opaque.rs:31:11
|
||||
|
|
||||
LL | x.method();
|
||||
| ^^^^^^ method not found in `&_`
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
//@ revisions: current next
|
||||
//@[next] compile-flags: -Znext-solver
|
||||
//@ edition: 2015
|
||||
|
||||
// If we don't treat `impl Sized` as rigid, the first call would
|
||||
// resolve to the trait method, constraining the opaque, while the
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
//@ aux-build:no_method_suggested_traits.rs
|
||||
//@ dont-require-annotations: HELP
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0599]: no method named `method` found for type `u32` in the current scope
|
||||
--> $DIR/no-method-suggested-traits.rs:25:10
|
||||
--> $DIR/no-method-suggested-traits.rs:26:10
|
||||
|
|
||||
LL | 1u32.method();
|
||||
| ^^^^^^
|
||||
|
|
@ -17,7 +17,7 @@ LL | 1u32.method2();
|
|||
| +
|
||||
|
||||
error[E0599]: no method named `method` found for struct `Rc<&mut Box<&u32>>` in the current scope
|
||||
--> $DIR/no-method-suggested-traits.rs:28:44
|
||||
--> $DIR/no-method-suggested-traits.rs:29:44
|
||||
|
|
||||
LL | std::rc::Rc::new(&mut Box::new(&1u32)).method();
|
||||
| ^^^^^^
|
||||
|
|
@ -35,7 +35,7 @@ LL | std::rc::Rc::new(&mut Box::new(&1u32)).method2();
|
|||
| +
|
||||
|
||||
error[E0599]: no method named `method` found for type `char` in the current scope
|
||||
--> $DIR/no-method-suggested-traits.rs:32:9
|
||||
--> $DIR/no-method-suggested-traits.rs:33:9
|
||||
|
|
||||
LL | fn method(&self) {}
|
||||
| ------ the method is available for `char` here
|
||||
|
|
@ -54,7 +54,7 @@ LL | 'a'.method2();
|
|||
| +
|
||||
|
||||
error[E0599]: no method named `method` found for struct `Rc<&mut Box<&char>>` in the current scope
|
||||
--> $DIR/no-method-suggested-traits.rs:34:43
|
||||
--> $DIR/no-method-suggested-traits.rs:35:43
|
||||
|
|
||||
LL | std::rc::Rc::new(&mut Box::new(&'a')).method();
|
||||
| ^^^^^^
|
||||
|
|
@ -70,7 +70,7 @@ LL | std::rc::Rc::new(&mut Box::new(&'a')).method2();
|
|||
| +
|
||||
|
||||
error[E0599]: no method named `method` found for type `i32` in the current scope
|
||||
--> $DIR/no-method-suggested-traits.rs:37:10
|
||||
--> $DIR/no-method-suggested-traits.rs:38:10
|
||||
|
|
||||
LL | 1i32.method();
|
||||
| ^^^^^^
|
||||
|
|
@ -91,7 +91,7 @@ LL | 1i32.method3();
|
|||
| +
|
||||
|
||||
error[E0599]: no method named `method` found for struct `Rc<&mut Box<&i32>>` in the current scope
|
||||
--> $DIR/no-method-suggested-traits.rs:39:44
|
||||
--> $DIR/no-method-suggested-traits.rs:40:44
|
||||
|
|
||||
LL | std::rc::Rc::new(&mut Box::new(&1i32)).method();
|
||||
| ^^^^^^
|
||||
|
|
@ -107,7 +107,7 @@ LL | std::rc::Rc::new(&mut Box::new(&1i32)).method3();
|
|||
| +
|
||||
|
||||
error[E0599]: no method named `method` found for struct `Foo` in the current scope
|
||||
--> $DIR/no-method-suggested-traits.rs:42:9
|
||||
--> $DIR/no-method-suggested-traits.rs:43:9
|
||||
|
|
||||
LL | struct Foo;
|
||||
| ---------- method `method` not found for this struct
|
||||
|
|
@ -123,7 +123,7 @@ LL | Foo.method();
|
|||
candidate #4: `no_method_suggested_traits::qux::PrivPub`
|
||||
|
||||
error[E0599]: no method named `method` found for struct `Rc<&mut Box<&Foo>>` in the current scope
|
||||
--> $DIR/no-method-suggested-traits.rs:44:43
|
||||
--> $DIR/no-method-suggested-traits.rs:45:43
|
||||
|
|
||||
LL | std::rc::Rc::new(&mut Box::new(&Foo)).method();
|
||||
| ^^^^^^ method not found in `Rc<&mut Box<&Foo>>`
|
||||
|
|
@ -136,85 +136,85 @@ LL | std::rc::Rc::new(&mut Box::new(&Foo)).method();
|
|||
candidate #4: `no_method_suggested_traits::qux::PrivPub`
|
||||
|
||||
error[E0599]: no method named `method2` found for type `u64` in the current scope
|
||||
--> $DIR/no-method-suggested-traits.rs:47:10
|
||||
--> $DIR/no-method-suggested-traits.rs:48:10
|
||||
|
|
||||
LL | 1u64.method2();
|
||||
| ^^^^^^^ method not found in `u64`
|
||||
|
|
||||
= help: items from traits can only be used if the trait is implemented and in scope
|
||||
note: `foo::Bar` defines an item `method2`, perhaps you need to implement it
|
||||
--> $DIR/no-method-suggested-traits.rs:10:5
|
||||
--> $DIR/no-method-suggested-traits.rs:11:5
|
||||
|
|
||||
LL | pub trait Bar {
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error[E0599]: no method named `method2` found for struct `Rc<&mut Box<&u64>>` in the current scope
|
||||
--> $DIR/no-method-suggested-traits.rs:49:44
|
||||
--> $DIR/no-method-suggested-traits.rs:50:44
|
||||
|
|
||||
LL | std::rc::Rc::new(&mut Box::new(&1u64)).method2();
|
||||
| ^^^^^^^ method not found in `Rc<&mut Box<&u64>>`
|
||||
|
|
||||
= help: items from traits can only be used if the trait is implemented and in scope
|
||||
note: `foo::Bar` defines an item `method2`, perhaps you need to implement it
|
||||
--> $DIR/no-method-suggested-traits.rs:10:5
|
||||
--> $DIR/no-method-suggested-traits.rs:11:5
|
||||
|
|
||||
LL | pub trait Bar {
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error[E0599]: no method named `method2` found for struct `no_method_suggested_traits::Foo` in the current scope
|
||||
--> $DIR/no-method-suggested-traits.rs:52:37
|
||||
--> $DIR/no-method-suggested-traits.rs:53:37
|
||||
|
|
||||
LL | no_method_suggested_traits::Foo.method2();
|
||||
| ^^^^^^^ method not found in `no_method_suggested_traits::Foo`
|
||||
|
|
||||
= help: items from traits can only be used if the trait is implemented and in scope
|
||||
note: `foo::Bar` defines an item `method2`, perhaps you need to implement it
|
||||
--> $DIR/no-method-suggested-traits.rs:10:5
|
||||
--> $DIR/no-method-suggested-traits.rs:11:5
|
||||
|
|
||||
LL | pub trait Bar {
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error[E0599]: no method named `method2` found for struct `Rc<&mut Box<&no_method_suggested_traits::Foo>>` in the current scope
|
||||
--> $DIR/no-method-suggested-traits.rs:54:71
|
||||
--> $DIR/no-method-suggested-traits.rs:55:71
|
||||
|
|
||||
LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Foo)).method2();
|
||||
| ^^^^^^^ method not found in `Rc<&mut Box<&no_method_suggested_traits::Foo>>`
|
||||
|
|
||||
= help: items from traits can only be used if the trait is implemented and in scope
|
||||
note: `foo::Bar` defines an item `method2`, perhaps you need to implement it
|
||||
--> $DIR/no-method-suggested-traits.rs:10:5
|
||||
--> $DIR/no-method-suggested-traits.rs:11:5
|
||||
|
|
||||
LL | pub trait Bar {
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error[E0599]: no method named `method2` found for enum `no_method_suggested_traits::Bar` in the current scope
|
||||
--> $DIR/no-method-suggested-traits.rs:56:40
|
||||
--> $DIR/no-method-suggested-traits.rs:57:40
|
||||
|
|
||||
LL | no_method_suggested_traits::Bar::X.method2();
|
||||
| ^^^^^^^ method not found in `no_method_suggested_traits::Bar`
|
||||
|
|
||||
= help: items from traits can only be used if the trait is implemented and in scope
|
||||
note: `foo::Bar` defines an item `method2`, perhaps you need to implement it
|
||||
--> $DIR/no-method-suggested-traits.rs:10:5
|
||||
--> $DIR/no-method-suggested-traits.rs:11:5
|
||||
|
|
||||
LL | pub trait Bar {
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error[E0599]: no method named `method2` found for struct `Rc<&mut Box<&no_method_suggested_traits::Bar>>` in the current scope
|
||||
--> $DIR/no-method-suggested-traits.rs:58:74
|
||||
--> $DIR/no-method-suggested-traits.rs:59:74
|
||||
|
|
||||
LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).method2();
|
||||
| ^^^^^^^ method not found in `Rc<&mut Box<&no_method_suggested_traits::Bar>>`
|
||||
|
|
||||
= help: items from traits can only be used if the trait is implemented and in scope
|
||||
note: `foo::Bar` defines an item `method2`, perhaps you need to implement it
|
||||
--> $DIR/no-method-suggested-traits.rs:10:5
|
||||
--> $DIR/no-method-suggested-traits.rs:11:5
|
||||
|
|
||||
LL | pub trait Bar {
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error[E0599]: no method named `method3` found for struct `Foo` in the current scope
|
||||
--> $DIR/no-method-suggested-traits.rs:61:9
|
||||
--> $DIR/no-method-suggested-traits.rs:62:9
|
||||
|
|
||||
LL | struct Foo;
|
||||
| ---------- method `method3` not found for this struct
|
||||
|
|
@ -227,7 +227,7 @@ LL | Foo.method3();
|
|||
candidate #1: `PubPub`
|
||||
|
||||
error[E0599]: no method named `method3` found for struct `Rc<&mut Box<&Foo>>` in the current scope
|
||||
--> $DIR/no-method-suggested-traits.rs:63:43
|
||||
--> $DIR/no-method-suggested-traits.rs:64:43
|
||||
|
|
||||
LL | std::rc::Rc::new(&mut Box::new(&Foo)).method3();
|
||||
| ^^^^^^^ method not found in `Rc<&mut Box<&Foo>>`
|
||||
|
|
@ -237,7 +237,7 @@ LL | std::rc::Rc::new(&mut Box::new(&Foo)).method3();
|
|||
candidate #1: `PubPub`
|
||||
|
||||
error[E0599]: no method named `method3` found for enum `Bar` in the current scope
|
||||
--> $DIR/no-method-suggested-traits.rs:65:12
|
||||
--> $DIR/no-method-suggested-traits.rs:66:12
|
||||
|
|
||||
LL | enum Bar { X }
|
||||
| -------- method `method3` not found for this enum
|
||||
|
|
@ -250,7 +250,7 @@ LL | Bar::X.method3();
|
|||
candidate #1: `PubPub`
|
||||
|
||||
error[E0599]: no method named `method3` found for struct `Rc<&mut Box<&Bar>>` in the current scope
|
||||
--> $DIR/no-method-suggested-traits.rs:67:46
|
||||
--> $DIR/no-method-suggested-traits.rs:68:46
|
||||
|
|
||||
LL | std::rc::Rc::new(&mut Box::new(&Bar::X)).method3();
|
||||
| ^^^^^^^ method not found in `Rc<&mut Box<&Bar>>`
|
||||
|
|
@ -260,37 +260,37 @@ LL | std::rc::Rc::new(&mut Box::new(&Bar::X)).method3();
|
|||
candidate #1: `PubPub`
|
||||
|
||||
error[E0599]: no method named `method3` found for type `usize` in the current scope
|
||||
--> $DIR/no-method-suggested-traits.rs:71:13
|
||||
--> $DIR/no-method-suggested-traits.rs:72:13
|
||||
|
|
||||
LL | 1_usize.method3();
|
||||
| ^^^^^^^ method not found in `usize`
|
||||
|
||||
error[E0599]: no method named `method3` found for struct `Rc<&mut Box<&usize>>` in the current scope
|
||||
--> $DIR/no-method-suggested-traits.rs:72:47
|
||||
--> $DIR/no-method-suggested-traits.rs:73:47
|
||||
|
|
||||
LL | std::rc::Rc::new(&mut Box::new(&1_usize)).method3();
|
||||
| ^^^^^^^ method not found in `Rc<&mut Box<&usize>>`
|
||||
|
||||
error[E0599]: no method named `method3` found for struct `no_method_suggested_traits::Foo` in the current scope
|
||||
--> $DIR/no-method-suggested-traits.rs:73:37
|
||||
--> $DIR/no-method-suggested-traits.rs:74:37
|
||||
|
|
||||
LL | no_method_suggested_traits::Foo.method3();
|
||||
| ^^^^^^^ method not found in `no_method_suggested_traits::Foo`
|
||||
|
||||
error[E0599]: no method named `method3` found for struct `Rc<&mut Box<&no_method_suggested_traits::Foo>>` in the current scope
|
||||
--> $DIR/no-method-suggested-traits.rs:74:71
|
||||
--> $DIR/no-method-suggested-traits.rs:75:71
|
||||
|
|
||||
LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Foo)).method3();
|
||||
| ^^^^^^^ method not found in `Rc<&mut Box<&no_method_suggested_traits::Foo>>`
|
||||
|
||||
error[E0599]: no method named `method3` found for enum `no_method_suggested_traits::Bar` in the current scope
|
||||
--> $DIR/no-method-suggested-traits.rs:76:40
|
||||
--> $DIR/no-method-suggested-traits.rs:77:40
|
||||
|
|
||||
LL | no_method_suggested_traits::Bar::X.method3();
|
||||
| ^^^^^^^ method not found in `no_method_suggested_traits::Bar`
|
||||
|
||||
error[E0599]: no method named `method3` found for struct `Rc<&mut Box<&no_method_suggested_traits::Bar>>` in the current scope
|
||||
--> $DIR/no-method-suggested-traits.rs:77:74
|
||||
--> $DIR/no-method-suggested-traits.rs:78:74
|
||||
|
|
||||
LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).method3();
|
||||
| ^^^^^^^ method not found in `Rc<&mut Box<&no_method_suggested_traits::Bar>>`
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
// https://github.com/rust-lang/rust/issues/98467
|
||||
|
||||
mod a {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error: `foo` is ambiguous
|
||||
--> $DIR/ambiguous-14.rs:22:8
|
||||
--> $DIR/ambiguous-14.rs:23:8
|
||||
|
|
||||
LL | g::foo();
|
||||
| ^^^ ambiguous name
|
||||
|
|
@ -8,13 +8,13 @@ LL | g::foo();
|
|||
= note: for more information, see issue #114095 <https://github.com/rust-lang/rust/issues/114095>
|
||||
= note: ambiguous because of multiple glob imports of a name in the same module
|
||||
note: `foo` could refer to the function imported here
|
||||
--> $DIR/ambiguous-14.rs:12:13
|
||||
--> $DIR/ambiguous-14.rs:13:13
|
||||
|
|
||||
LL | pub use a::*;
|
||||
| ^^^^
|
||||
= help: consider adding an explicit import of `foo` to disambiguate
|
||||
note: `foo` could also refer to the function imported here
|
||||
--> $DIR/ambiguous-14.rs:13:13
|
||||
--> $DIR/ambiguous-14.rs:14:13
|
||||
|
|
||||
LL | pub use b::*;
|
||||
| ^^^^
|
||||
|
|
@ -25,7 +25,7 @@ error: aborting due to 1 previous error
|
|||
|
||||
Future incompatibility report: Future breakage diagnostic:
|
||||
error: `foo` is ambiguous
|
||||
--> $DIR/ambiguous-14.rs:22:8
|
||||
--> $DIR/ambiguous-14.rs:23:8
|
||||
|
|
||||
LL | g::foo();
|
||||
| ^^^ ambiguous name
|
||||
|
|
@ -34,13 +34,13 @@ LL | g::foo();
|
|||
= note: for more information, see issue #114095 <https://github.com/rust-lang/rust/issues/114095>
|
||||
= note: ambiguous because of multiple glob imports of a name in the same module
|
||||
note: `foo` could refer to the function imported here
|
||||
--> $DIR/ambiguous-14.rs:12:13
|
||||
--> $DIR/ambiguous-14.rs:13:13
|
||||
|
|
||||
LL | pub use a::*;
|
||||
| ^^^^
|
||||
= help: consider adding an explicit import of `foo` to disambiguate
|
||||
note: `foo` could also refer to the function imported here
|
||||
--> $DIR/ambiguous-14.rs:13:13
|
||||
--> $DIR/ambiguous-14.rs:14:13
|
||||
|
|
||||
LL | pub use b::*;
|
||||
| ^^^^
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//@ edition:2015
|
||||
// https://github.com/rust-lang/rust/pull/113099#issuecomment-1638206152
|
||||
|
||||
pub use evp::*; //~ WARNING ambiguous glob re-exports
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue