Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0428]: the name `foo` is defined multiple times
--> $DIR/hir-crate-items-before-lowering-ices.rs:12:17
--> $DIR/hir-crate-items-before-lowering-ices.rs:13:17
|
LL | fn foo() {}
| -------- previous definition of the value `foo` here
Expand All @@ -9,7 +9,7 @@ LL | reuse foo;
= note: `foo` must be defined only once in the value namespace of this block

error: complex const arguments must be placed inside of a `const` block
--> $DIR/hir-crate-items-before-lowering-ices.rs:10:37
--> $DIR/hir-crate-items-before-lowering-ices.rs:11:37
|
LL | core::direct_const_arg!({
| _____________________________________^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: `#[deprecated]` attribute cannot be used on delegations
--> $DIR/hir-crate-items-before-lowering-ices.rs:26:9
--> $DIR/hir-crate-items-before-lowering-ices.rs:27:9
|
LL | #[deprecated]
| ^^^^^^^^^^^^^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: delegation's target expression is specified for function with no params
--> $DIR/hir-crate-items-before-lowering-ices.rs:36:18
--> $DIR/hir-crate-items-before-lowering-ices.rs:37:18
|
LL | reuse a as b {
| __________________^
Expand All @@ -10,7 +10,7 @@ LL | | }
| |_____^

error[E0061]: this function takes 0 arguments but 1 argument was supplied
--> $DIR/hir-crate-items-before-lowering-ices.rs:36:11
--> $DIR/hir-crate-items-before-lowering-ices.rs:37:11
|
LL | reuse a as b {
| ___________^______-
Expand All @@ -21,7 +21,7 @@ LL | | }
| |_____- unexpected argument of type `fn() {foo::<_>}`
|
note: function defined here
--> $DIR/hir-crate-items-before-lowering-ices.rs:34:8
--> $DIR/hir-crate-items-before-lowering-ices.rs:35:8
|
LL | fn a() {}
| ^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: complex const arguments must be placed inside of a `const` block
--> $DIR/hir-crate-items-before-lowering-ices.rs:47:37
--> $DIR/hir-crate-items-before-lowering-ices.rs:48:37
|
LL | core::direct_const_arg!({
| _____________________________________^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
error[E0425]: cannot find value `async` in this scope
--> $DIR/hir-crate-items-before-lowering-ices.rs:66:13
error: function cannot return without recursing
--> $DIR/hir-crate-items-before-lowering-ices.rs:67:22
|
LL | async || {};
| ^^^^^ not found in this scope

error[E0308]: mismatched types
--> $DIR/hir-crate-items-before-lowering-ices.rs:66:22
LL | reuse Trait::bar {
| ^^^
| |
| cannot return without recursing
| recursive call site
|
= help: a `loop` may express intention better if this is on purpose
note: the lint level is defined here
--> $DIR/hir-crate-items-before-lowering-ices.rs:61:8
|
LL | async || {};
| ^^ expected `bool`, found `()`
LL | #[deny(unconditional_recursion)]
| ^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 2 previous errors
error: aborting due to 1 previous error

Some errors have detailed explanations: E0308, E0425.
For more information about an error, try `rustc --explain E0308`.
7 changes: 4 additions & 3 deletions tests/ui/delegation/hir-crate-items-before-lowering-ices.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//@ revisions: ice_155125 ice_155127 ice_155128 ice_155164 ice_155202
//@[ice_155202] edition: 2024

#![feature(min_generic_const_args, fn_delegation)]

Expand Down Expand Up @@ -57,14 +58,14 @@ mod ice_155164 {
}

#[cfg(ice_155202)]
#[deny(unconditional_recursion)]
mod ice_155202 {
trait Trait {
fn bar(self);
}
impl Trait for () {
reuse Trait::bar {
async || {}; //[ice_155202]~ ERROR: mismatched types
//[ice_155202]~^ ERROR: cannot find value `async` in this scope
reuse Trait::bar { //[ice_155202]~ ERROR: cannot return without recursing
async || {};
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions tests/ui/type-alias-impl-trait/tait-normalize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
//@ [next] compile-flags: -Znext-solver
//@ check-pass

// this fails in edition 2021; see tests/crashes/119786-1.rs
//@ edition: 2015..2018

#![feature(type_alias_impl_trait)]

fn enum_upvar() {
Expand Down
70 changes: 35 additions & 35 deletions tests/ui/use/use-self-at-end.e2015.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: imports need to be explicitly named
--> $DIR/use-self-at-end.rs:14:24
--> $DIR/use-self-at-end.rs:15:24
|
LL | pub use crate::self;
| ^^^^
Expand All @@ -10,7 +10,7 @@ LL | pub use crate::self as name;
| +++++++

error: imports need to be explicitly named
--> $DIR/use-self-at-end.rs:16:25
--> $DIR/use-self-at-end.rs:17:25
|
LL | pub use crate::{self};
| ^^^^
Expand All @@ -21,7 +21,7 @@ LL | pub use crate::{self as name};
| +++++++

error: imports need to be explicitly named
--> $DIR/use-self-at-end.rs:20:17
--> $DIR/use-self-at-end.rs:21:17
|
LL | pub use self;
| ^^^^
Expand All @@ -32,7 +32,7 @@ LL | pub use self as name;
| +++++++

error: imports need to be explicitly named
--> $DIR/use-self-at-end.rs:22:18
--> $DIR/use-self-at-end.rs:23:18
|
LL | pub use {self};
| ^^^^
Expand All @@ -43,7 +43,7 @@ LL | pub use {self as name};
| +++++++

error: imports need to be explicitly named
--> $DIR/use-self-at-end.rs:26:23
--> $DIR/use-self-at-end.rs:27:23
|
LL | pub use self::self;
| ^^^^
Expand All @@ -54,7 +54,7 @@ LL | pub use self::self as name;
| +++++++

error: imports need to be explicitly named
--> $DIR/use-self-at-end.rs:29:24
--> $DIR/use-self-at-end.rs:30:24
|
LL | pub use self::{self};
| ^^^^
Expand All @@ -65,7 +65,7 @@ LL | pub use self::{self as name};
| +++++++

error: imports need to be explicitly named
--> $DIR/use-self-at-end.rs:33:24
--> $DIR/use-self-at-end.rs:34:24
|
LL | pub use super::self;
| ^^^^
Expand All @@ -76,7 +76,7 @@ LL | pub use super::self as name;
| +++++++

error: imports need to be explicitly named
--> $DIR/use-self-at-end.rs:36:25
--> $DIR/use-self-at-end.rs:37:25
|
LL | pub use super::{self};
| ^^^^
Expand All @@ -87,7 +87,7 @@ LL | pub use super::{self as name};
| +++++++

error: imports need to be explicitly named
--> $DIR/use-self-at-end.rs:48:19
--> $DIR/use-self-at-end.rs:50:19
|
LL | pub use ::self;
| ^^^^
Expand All @@ -98,7 +98,7 @@ LL | pub use ::self as name;
| +++++++

error: imports need to be explicitly named
--> $DIR/use-self-at-end.rs:52:20
--> $DIR/use-self-at-end.rs:56:20
|
LL | pub use ::{self};
| ^^^^
Expand All @@ -109,31 +109,31 @@ LL | pub use ::{self as name};
| +++++++

error: `self` in paths can only be used in start position or last position
--> $DIR/use-self-at-end.rs:57:20
--> $DIR/use-self-at-end.rs:63:20
|
LL | pub use z::self::self;
| ^^^^

error: `self` in paths can only be used in start position or last position
--> $DIR/use-self-at-end.rs:58:20
--> $DIR/use-self-at-end.rs:64:20
|
LL | pub use z::self::self as z1;
| ^^^^

error: `self` in paths can only be used in start position or last position
--> $DIR/use-self-at-end.rs:59:21
--> $DIR/use-self-at-end.rs:65:21
|
LL | pub use z::{self::{self}};
| ^^^^

error: `self` in paths can only be used in start position or last position
--> $DIR/use-self-at-end.rs:60:21
--> $DIR/use-self-at-end.rs:66:21
|
LL | pub use z::{self::{self as z2}};
| ^^^^

error[E0252]: the name `x` is defined multiple times
--> $DIR/use-self-at-end.rs:42:28
--> $DIR/use-self-at-end.rs:43:28
|
LL | pub use crate::x::self;
| -------------- previous import of the module `x` here
Expand All @@ -147,7 +147,7 @@ LL | pub use crate::x::{self};
= note: `x` must be defined only once in the type namespace of this module

error[E0252]: the name `Enum` is defined multiple times
--> $DIR/use-self-at-end.rs:71:31
--> $DIR/use-self-at-end.rs:77:31
|
LL | pub use super::Enum::self;
| ----------------- previous import of the type `Enum` here
Expand All @@ -161,7 +161,7 @@ LL | pub use super::Enum::{self};
= note: `Enum` must be defined only once in the type namespace of this module

error[E0252]: the name `Trait` is defined multiple times
--> $DIR/use-self-at-end.rs:79:32
--> $DIR/use-self-at-end.rs:88:32
|
LL | pub use super::Trait::self;
| ------------------ previous import of the trait `Trait` here
Expand All @@ -175,103 +175,103 @@ LL | pub use super::Trait::{self};
= note: `Trait` must be defined only once in the type namespace of this module

error[E0432]: unresolved import `super::Struct`
--> $DIR/use-self-at-end.rs:63:24
--> $DIR/use-self-at-end.rs:69:24
|
LL | pub use super::Struct::self;
| ^^^^^^ `Struct` is a struct, not a module

error[E0432]: unresolved import `super::Struct`
--> $DIR/use-self-at-end.rs:64:24
--> $DIR/use-self-at-end.rs:70:24
|
LL | pub use super::Struct::self as Struct1;
| ^^^^^^ `Struct` is a struct, not a module

error[E0432]: unresolved import `super::Struct`
--> $DIR/use-self-at-end.rs:65:24
--> $DIR/use-self-at-end.rs:71:24
|
LL | pub use super::Struct::{self};
| ^^^^^^ `Struct` is a struct, not a module

error[E0433]: `self` in paths can only be used in start position or last position
--> $DIR/use-self-at-end.rs:83:24
--> $DIR/use-self-at-end.rs:92:24
|
LL | pub use super::self::y::z;
| ^^^^ can only be used in path start position or last position

error[E0433]: `self` in paths can only be used in start position or last position
--> $DIR/use-self-at-end.rs:84:24
--> $DIR/use-self-at-end.rs:93:24
|
LL | pub use super::self::y::z as z3;
| ^^^^ can only be used in path start position or last position

error[E0433]: `self` in paths can only be used in start position or last position
--> $DIR/use-self-at-end.rs:85:24
--> $DIR/use-self-at-end.rs:94:24
|
LL | pub use super::self::y::{z};
| ^^^^ can only be used in path start position or last position

error[E0433]: `self` in paths can only be used in start position or last position
--> $DIR/use-self-at-end.rs:86:24
--> $DIR/use-self-at-end.rs:95:24
|
LL | pub use super::self::y::{z as z4};
| ^^^^ can only be used in path start position or last position

error[E0432]: unresolved import `super::Struct`
--> $DIR/use-self-at-end.rs:66:24
--> $DIR/use-self-at-end.rs:72:24
|
LL | pub use super::Struct::{self as Struct2};
| ^^^^^^ `Struct` is a struct, not a module

error[E0433]: `self` in paths can only be used in start position or last position
--> $DIR/use-self-at-end.rs:56:21
--> $DIR/use-self-at-end.rs:62:21
|
LL | type G = z::self::self;
| ^^^^ can only be used in path start position or last position

error[E0433]: `self` in paths can only be used in start position or last position
--> $DIR/use-self-at-end.rs:82:25
--> $DIR/use-self-at-end.rs:91:25
|
LL | type K = super::self::y::z;
| ^^^^ can only be used in path start position or last position

error[E0573]: expected type, found module `crate::self`
--> $DIR/use-self-at-end.rs:13:18
--> $DIR/use-self-at-end.rs:14:18
|
LL | type A = crate::self;
| ^^^^^^^^^^^ not a type

error[E0573]: expected type, found module `self`
--> $DIR/use-self-at-end.rs:19:18
--> $DIR/use-self-at-end.rs:20:18
|
LL | type B = self;
| ^^^^ not a type

error[E0573]: expected type, found module `self::self`
--> $DIR/use-self-at-end.rs:25:18
--> $DIR/use-self-at-end.rs:26:18
|
LL | type C = self::self;
| ^^^^^^^^^^ not a type

error[E0573]: expected type, found module `super::self`
--> $DIR/use-self-at-end.rs:32:18
--> $DIR/use-self-at-end.rs:33:18
|
LL | type D = super::self;
| ^^^^^^^^^^^ not a type

error[E0573]: expected type, found module `crate::x::self`
--> $DIR/use-self-at-end.rs:39:18
--> $DIR/use-self-at-end.rs:40:18
|
LL | type E = crate::x::self;
| ^^^^^^^^^^^^^^ not a type

error[E0573]: expected type, found module `::self`
--> $DIR/use-self-at-end.rs:45:18
--> $DIR/use-self-at-end.rs:46:18
|
LL | type F = ::self;
| ^^^^^^ not a type

error[E0223]: ambiguous associated type
--> $DIR/use-self-at-end.rs:62:18
--> $DIR/use-self-at-end.rs:68:18
|
LL | type H = super::Struct::self;
| ^^^^^^^^^^^^^^^^^^^
Expand All @@ -283,7 +283,7 @@ LL + type H = <x::Struct as Example>::self;
|

warning: trait objects without an explicit `dyn` are deprecated
--> $DIR/use-self-at-end.rs:74:18
--> $DIR/use-self-at-end.rs:80:18
|
LL | type J = super::Trait::self;
| ^^^^^^^^^^^^^^^^^^
Expand Down
Loading
Loading