Auto merge of #93967 - cjgillot:short-struct-span, r=petrochenkov

Shorten def_span for more items.

The `def_span` query only returns the signature span for functions.
Struct/enum/union definitions can also have a very long body.
This PR shortens the associated span.
This commit is contained in:
bors 2022-07-01 20:14:34 +00:00
commit 46b8c23f3e
421 changed files with 2171 additions and 3495 deletions

View file

@ -934,28 +934,105 @@ impl<'hir> Map<'hir> {
}
/// Gets the span of the definition of the specified HIR node.
/// This is used by `tcx.get_span`
/// This is used by `tcx.def_span`.
pub fn span(self, hir_id: HirId) -> Span {
self.opt_span(hir_id)
.unwrap_or_else(|| bug!("hir::map::Map::span: id not in map: {:?}", hir_id))
}
pub fn opt_span(self, hir_id: HirId) -> Option<Span> {
fn until_within(outer: Span, end: Span) -> Span {
if let Some(end) = end.find_ancestor_inside(outer) {
outer.with_hi(end.hi())
} else {
outer
}
}
fn named_span(item_span: Span, ident: Ident, generics: Option<&Generics<'_>>) -> Span {
if ident.name != kw::Empty {
let mut span = until_within(item_span, ident.span);
if let Some(g) = generics
&& !g.span.is_dummy()
&& let Some(g_span) = g.span.find_ancestor_inside(item_span)
{
span = span.to(g_span);
}
span
} else {
item_span
}
}
let span = match self.find(hir_id)? {
Node::Param(param) => param.span,
// Function-like.
Node::Item(Item { kind: ItemKind::Fn(sig, ..), .. })
| Node::TraitItem(TraitItem { kind: TraitItemKind::Fn(sig, ..), .. })
| Node::ImplItem(ImplItem { kind: ImplItemKind::Fn(sig, ..), .. }) => sig.span,
// Constants and Statics.
Node::Item(Item {
kind:
ItemKind::Const(ty, ..)
| ItemKind::Static(ty, ..)
| ItemKind::Impl(Impl { self_ty: ty, .. }),
span: outer_span,
..
})
| Node::TraitItem(TraitItem {
kind: TraitItemKind::Const(ty, ..),
span: outer_span,
..
})
| Node::ImplItem(ImplItem {
kind: ImplItemKind::Const(ty, ..),
span: outer_span,
..
})
| Node::ForeignItem(ForeignItem {
kind: ForeignItemKind::Static(ty, ..),
span: outer_span,
..
}) => until_within(*outer_span, ty.span),
// With generics and bounds.
Node::Item(Item {
kind: ItemKind::Trait(_, _, generics, bounds, _),
span: outer_span,
..
})
| Node::TraitItem(TraitItem {
kind: TraitItemKind::Type(bounds, _),
generics,
span: outer_span,
..
}) => {
let end = if let Some(b) = bounds.last() { b.span() } else { generics.span };
until_within(*outer_span, end)
}
// Other cases.
Node::Item(item) => match &item.kind {
ItemKind::Fn(sig, _, _) => sig.span,
_ => item.span,
ItemKind::Use(path, _) => path.span,
_ => named_span(item.span, item.ident, item.kind.generics()),
},
Node::ImplItem(item) => named_span(item.span, item.ident, Some(item.generics)),
Node::ForeignItem(item) => match item.kind {
ForeignItemKind::Fn(decl, _, _) => until_within(item.span, decl.output.span()),
_ => named_span(item.span, item.ident, None),
},
Node::Ctor(..) => return self.opt_span(self.get_parent_node(hir_id)),
_ => self.span_with_body(hir_id),
};
Some(span)
}
/// Like `hir.span()`, but includes the body of items
/// (instead of just the item header)
pub fn span_with_body(self, hir_id: HirId) -> Span {
match self.get(hir_id) {
Node::Param(param) => param.span,
Node::Item(item) => item.span,
Node::ForeignItem(foreign_item) => foreign_item.span,
Node::TraitItem(trait_item) => match &trait_item.kind {
TraitItemKind::Fn(sig, _) => sig.span,
_ => trait_item.span,
},
Node::ImplItem(impl_item) => match &impl_item.kind {
ImplItemKind::Fn(sig, _) => sig.span,
_ => impl_item.span,
},
Node::TraitItem(trait_item) => trait_item.span,
Node::ImplItem(impl_item) => impl_item.span,
Node::Variant(variant) => variant.span,
Node::Field(field) => field.span,
Node::AnonConst(constant) => self.body(constant.body).value.span,
@ -973,29 +1050,12 @@ impl<'hir> Map<'hir> {
Node::Pat(pat) => pat.span,
Node::Arm(arm) => arm.span,
Node::Block(block) => block.span,
Node::Ctor(..) => match self.find(self.get_parent_node(hir_id))? {
Node::Item(item) => item.span,
Node::Variant(variant) => variant.span,
_ => unreachable!(),
},
Node::Ctor(..) => self.span_with_body(self.get_parent_node(hir_id)),
Node::Lifetime(lifetime) => lifetime.span,
Node::GenericParam(param) => param.span,
Node::Infer(i) => i.span,
Node::Local(local) => local.span,
Node::Crate(item) => item.spans.inner_span,
};
Some(span)
}
/// Like `hir.span()`, but includes the body of function items
/// (instead of just the function header)
pub fn span_with_body(self, hir_id: HirId) -> Span {
match self.find(hir_id) {
Some(Node::TraitItem(item)) => item.span,
Some(Node::ImplItem(impl_item)) => impl_item.span,
Some(Node::Item(item)) => item.span,
Some(_) => self.span(hir_id),
_ => bug!("hir::map::Map::span_with_body: id not in map: {:?}", hir_id),
}
}

View file

@ -10,6 +10,6 @@ struct C(Box<A>);
#[cfg(cfail)]
struct C(A);
//[cfail]~^ ERROR 12:1: 12:13: recursive type `C` has infinite size [E0072]
//[cfail]~^ ERROR 12:1: 12:9: recursive type `C` has infinite size [E0072]
fn main() {}

View file

@ -40,11 +40,11 @@
- StorageDead(_5); // scope 0 at $DIR/const-promotion-extern-static.rs:9:43: 9:44
- StorageDead(_3); // scope 0 at $DIR/const-promotion-extern-static.rs:9:43: 9:44
StorageDead(_1); // scope 0 at $DIR/const-promotion-extern-static.rs:9:43: 9:44
return; // scope 0 at $DIR/const-promotion-extern-static.rs:9:1: 9:45
return; // scope 0 at $DIR/const-promotion-extern-static.rs:9:1: 9:28
}
bb2 (cleanup): {
resume; // scope 0 at $DIR/const-promotion-extern-static.rs:9:1: 9:45
resume; // scope 0 at $DIR/const-promotion-extern-static.rs:9:1: 9:28
}
- }
-

View file

@ -12,6 +12,6 @@ static BOP: &i32 = {
_1 = &_2; // scope 0 at $DIR/const-promotion-extern-static.rs:16:20: 16:23
_0 = &(*_1); // scope 0 at $DIR/const-promotion-extern-static.rs:16:20: 16:23
StorageDead(_1); // scope 0 at $DIR/const-promotion-extern-static.rs:16:22: 16:23
return; // scope 0 at $DIR/const-promotion-extern-static.rs:16:1: 16:24
return; // scope 0 at $DIR/const-promotion-extern-static.rs:16:1: 16:17
}
}

View file

@ -42,11 +42,11 @@
- StorageDead(_5); // scope 0 at $DIR/const-promotion-extern-static.rs:13:54: 13:55
- StorageDead(_3); // scope 0 at $DIR/const-promotion-extern-static.rs:13:54: 13:55
StorageDead(_1); // scope 0 at $DIR/const-promotion-extern-static.rs:13:54: 13:55
return; // scope 0 at $DIR/const-promotion-extern-static.rs:13:1: 13:56
return; // scope 0 at $DIR/const-promotion-extern-static.rs:13:1: 13:28
}
bb2 (cleanup): {
resume; // scope 0 at $DIR/const-promotion-extern-static.rs:13:1: 13:56
resume; // scope 0 at $DIR/const-promotion-extern-static.rs:13:1: 13:28
}
}
-

View file

@ -1,6 +1,6 @@
// MIR for `<impl at $DIR/issue-41697.rs:18:1: 22:2>::{constant#0}` after SimplifyCfg-promote-consts
// MIR for `<impl at $DIR/issue-41697.rs:18:1: 18:23>::{constant#0}` after SimplifyCfg-promote-consts
<impl at $DIR/issue-41697.rs:18:1: 22:2>::{constant#0}: usize = {
<impl at $DIR/issue-41697.rs:18:1: 18:23>::{constant#0}: usize = {
let mut _0: usize; // return place in scope 0 at $DIR/issue-41697.rs:18:19: 18:22
let mut _1: (usize, bool); // in scope 0 at $DIR/issue-41697.rs:18:19: 18:22

View file

@ -1,6 +1,6 @@
// MIR for `<impl at $DIR/issue-41697.rs:18:1: 22:2>::{constant#0}` after SimplifyCfg-promote-consts
// MIR for `<impl at $DIR/issue-41697.rs:18:1: 18:23>::{constant#0}` after SimplifyCfg-promote-consts
<impl at $DIR/issue-41697.rs:18:1: 22:2>::{constant#0}: usize = {
<impl at $DIR/issue-41697.rs:18:1: 18:23>::{constant#0}: usize = {
let mut _0: usize; // return place in scope 0 at $DIR/issue-41697.rs:18:19: 18:22
let mut _1: (usize, bool); // in scope 0 at $DIR/issue-41697.rs:18:19: 18:22

View file

@ -1,6 +1,6 @@
// MIR for `<impl at $DIR/retag.rs:11:1: 19:2>::foo` after SimplifyCfg-elaborate-drops
// MIR for `<impl at $DIR/retag.rs:11:1: 11:10>::foo` after SimplifyCfg-elaborate-drops
fn <impl at $DIR/retag.rs:11:1: 19:2>::foo(_1: &Test, _2: &mut i32) -> &mut i32 {
fn <impl at $DIR/retag.rs:11:1: 11:10>::foo(_1: &Test, _2: &mut i32) -> &mut i32 {
debug self => _1; // in scope 0 at $DIR/retag.rs:13:16: 13:21
debug x => _2; // in scope 0 at $DIR/retag.rs:13:23: 13:24
let mut _0: &mut i32; // return place in scope 0 at $DIR/retag.rs:13:42: 13:53

View file

@ -1,6 +1,6 @@
// MIR for `<impl at $DIR/retag.rs:11:1: 19:2>::foo_shr` after SimplifyCfg-elaborate-drops
// MIR for `<impl at $DIR/retag.rs:11:1: 11:10>::foo_shr` after SimplifyCfg-elaborate-drops
fn <impl at $DIR/retag.rs:11:1: 19:2>::foo_shr(_1: &Test, _2: &i32) -> &i32 {
fn <impl at $DIR/retag.rs:11:1: 11:10>::foo_shr(_1: &Test, _2: &i32) -> &i32 {
debug self => _1; // in scope 0 at $DIR/retag.rs:16:20: 16:25
debug x => _2; // in scope 0 at $DIR/retag.rs:16:27: 16:28
let mut _0: &i32; // return place in scope 0 at $DIR/retag.rs:16:42: 16:49

View file

@ -198,6 +198,6 @@ static XXX: &Foo = {
_0 = &(*_1); // scope 0 at $DIR/storage_live_dead_in_statics.rs:5:28: 23:2
StorageDead(_5); // scope 0 at $DIR/storage_live_dead_in_statics.rs:23:1: 23:2
StorageDead(_1); // scope 0 at $DIR/storage_live_dead_in_statics.rs:23:1: 23:2
return; // scope 0 at $DIR/storage_live_dead_in_statics.rs:5:1: 23:3
return; // scope 0 at $DIR/storage_live_dead_in_statics.rs:5:1: 5:25
}
}

View file

@ -1,10 +1,10 @@
// MIR for `<impl at $DIR/unusual-item-types.rs:9:1: 11:2>::ASSOCIATED_CONSTANT` 0 mir_map
// MIR for `<impl at $DIR/unusual-item-types.rs:9:1: 9:7>::ASSOCIATED_CONSTANT` 0 mir_map
const <impl at $DIR/unusual-item-types.rs:9:1: 11:2>::ASSOCIATED_CONSTANT: i32 = {
const <impl at $DIR/unusual-item-types.rs:9:1: 9:7>::ASSOCIATED_CONSTANT: i32 = {
let mut _0: i32; // return place in scope 0 at $DIR/unusual-item-types.rs:10:32: 10:35
bb0: {
_0 = const 2_i32; // scope 0 at $DIR/unusual-item-types.rs:10:38: 10:39
return; // scope 0 at $DIR/unusual-item-types.rs:10:5: 10:40
return; // scope 0 at $DIR/unusual-item-types.rs:10:5: 10:35
}
}

View file

@ -1,10 +1,10 @@
// MIR for `<impl at $DIR/unusual-item-types.rs:9:1: 11:2>::ASSOCIATED_CONSTANT` 0 mir_map
// MIR for `<impl at $DIR/unusual-item-types.rs:9:1: 9:7>::ASSOCIATED_CONSTANT` 0 mir_map
const <impl at $DIR/unusual-item-types.rs:9:1: 11:2>::ASSOCIATED_CONSTANT: i32 = {
const <impl at $DIR/unusual-item-types.rs:9:1: 9:7>::ASSOCIATED_CONSTANT: i32 = {
let mut _0: i32; // return place in scope 0 at $DIR/unusual-item-types.rs:10:32: 10:35
bb0: {
_0 = const 2_i32; // scope 0 at $DIR/unusual-item-types.rs:10:38: 10:39
return; // scope 0 at $DIR/unusual-item-types.rs:10:5: 10:40
return; // scope 0 at $DIR/unusual-item-types.rs:10:5: 10:35
}
}

View file

@ -1,9 +1,8 @@
error: missing code example in this documentation
--> $DIR/lint-missing-doc-code-example.rs:19:1
|
LL | / pub mod module1 {
LL | | }
| |_^
LL | pub mod module1 {
| ^^^^^^^^^^^^^^^
|
note: the lint level is defined here
--> $DIR/lint-missing-doc-code-example.rs:2:9

View file

@ -14,10 +14,10 @@ extern crate source_code;
#[path = "auxiliary/source-code-bar.rs"]
pub mod bar;
// @count - '//a[@href="../../src/foo/auxiliary/source-code-bar.rs.html#5-7"]' 4
// @count - '//a[@href="../../src/foo/auxiliary/source-code-bar.rs.html#5"]' 4
use bar::Bar;
// @has - '//a[@href="../../src/foo/auxiliary/source-code-bar.rs.html#13-17"]' 'self'
// @has - '//a[@href="../../src/foo/auxiliary/source-code-bar.rs.html#14-16"]' 'Trait'
// @has - '//a[@href="../../src/foo/auxiliary/source-code-bar.rs.html#13"]' 'self'
// @has - '//a[@href="../../src/foo/auxiliary/source-code-bar.rs.html#14"]' 'Trait'
use bar::sub::{self, Trait};
pub struct Foo;
@ -42,8 +42,8 @@ pub fn foo(a: u32, b: &str, c: String, d: Foo, e: bar::Bar, f: source_code::Sour
y.hello();
}
// @has - '//a[@href="../../src/foo/auxiliary/source-code-bar.rs.html#14-16"]' 'bar::sub::Trait'
// @has - '//a[@href="../../src/foo/auxiliary/source-code-bar.rs.html#14-16"]' 'Trait'
// @has - '//a[@href="../../src/foo/auxiliary/source-code-bar.rs.html#14"]' 'bar::sub::Trait'
// @has - '//a[@href="../../src/foo/auxiliary/source-code-bar.rs.html#14"]' 'Trait'
pub fn foo2<T: bar::sub::Trait, V: Trait>(t: &T, v: &V, b: bool) {}
pub trait AnotherTrait {}

View file

@ -15,5 +15,5 @@ extern crate macros;
// @has - '//*[@class="docblock"]' 'docs for my_macro'
// @has - '//*[@class="stab deprecated"]' 'Deprecated since 1.2.3: text'
// @has - '//*[@class="stab unstable"]' 'macro_test'
// @has - '//a/@href' '../src/macros/macros.rs.html#8-10'
// @has - '//a/@href' '../src/macros/macros.rs.html#8'
pub use macros::my_macro;

View file

@ -2,9 +2,7 @@ error: any use of this value will cause an error
--> $DIR/array_const_index-0.rs:2:16
|
LL | const B: i32 = (&A)[1];
| ---------------^^^^^^^-
| |
| index out of bounds: the length is 0 but the index is 1
| ------------ ^^^^^^^ index out of bounds: the length is 0 but the index is 1
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@ -17,9 +15,7 @@ error: any use of this value will cause an error
--> $DIR/array_const_index-0.rs:2:16
|
LL | const B: i32 = (&A)[1];
| ---------------^^^^^^^-
| |
| index out of bounds: the length is 0 but the index is 1
| ------------ ^^^^^^^ index out of bounds: the length is 0 but the index is 1
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!

View file

@ -2,9 +2,7 @@ error: any use of this value will cause an error
--> $DIR/array_const_index-1.rs:2:16
|
LL | const B: i32 = A[1];
| ---------------^^^^-
| |
| index out of bounds: the length is 0 but the index is 1
| ------------ ^^^^ index out of bounds: the length is 0 but the index is 1
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@ -17,9 +15,7 @@ error: any use of this value will cause an error
--> $DIR/array_const_index-1.rs:2:16
|
LL | const B: i32 = A[1];
| ---------------^^^^-
| |
| index out of bounds: the length is 0 but the index is 1
| ------------ ^^^^ index out of bounds: the length is 0 but the index is 1
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!

View file

@ -8,7 +8,7 @@ note: associated constant defined here does not match type
--> $DIR/assoc-const-ty-mismatch.rs:5:3
|
LL | const N: usize;
| ^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^
error: mismatch in bind of associated type, got const
--> $DIR/assoc-const-ty-mismatch.rs:25:18
@ -20,7 +20,7 @@ note: associated type defined here does not match const
--> $DIR/assoc-const-ty-mismatch.rs:9:3
|
LL | type T;
| ^^^^^^^
| ^^^^^^
error: aborting due to 2 previous errors

View file

@ -8,12 +8,12 @@ note: candidate #1 is defined in an impl of the trait `Foo` for the type `i32`
--> $DIR/associated-const-ambiguity-report.rs:10:5
|
LL | const ID: i32 = 1;
| ^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^
note: candidate #2 is defined in an impl of the trait `Bar` for the type `i32`
--> $DIR/associated-const-ambiguity-report.rs:14:5
|
LL | const ID: i32 = 3;
| ^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^
help: disambiguate the associated constant for candidate #1
|
LL | const X: i32 = <i32 as Foo>::ID;

View file

@ -2,7 +2,7 @@ error[E0624]: associated constant `ID` is private
--> $DIR/associated-const-private-impl.rs:13:30
|
LL | const ID: i32 = 1;
| ------------------ private associated constant defined here
| ------------- private associated constant defined here
...
LL | assert_eq!(1, bar1::Foo::ID);
| ^^ private associated constant

View file

@ -2,13 +2,13 @@ error[E0391]: cycle detected when const-evaluating + checking `Tr::A`
--> $DIR/defaults-cyclic-fail.rs:5:5
|
LL | const A: u8 = Self::B;
| ^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^
|
note: ...which requires const-evaluating + checking `Tr::B`...
--> $DIR/defaults-cyclic-fail.rs:8:5
|
LL | const B: u8 = Self::A;
| ^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^
= note: ...which again requires const-evaluating + checking `Tr::A`, completing the cycle
note: cycle used when const-evaluating + checking `main::promoted[1]`
--> $DIR/defaults-cyclic-fail.rs:16:16

View file

@ -2,9 +2,7 @@ error: any use of this value will cause an error
--> $DIR/defaults-not-assumed-fail.rs:8:19
|
LL | const B: u8 = Self::A + 1;
| --------------^^^^^^^^^^^-
| |
| attempt to compute `u8::MAX + 1_u8`, which would overflow
| ----------- ^^^^^^^^^^^ attempt to compute `u8::MAX + 1_u8`, which would overflow
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@ -34,9 +32,7 @@ error: any use of this value will cause an error
--> $DIR/defaults-not-assumed-fail.rs:8:19
|
LL | const B: u8 = Self::A + 1;
| --------------^^^^^^^^^^^-
| |
| attempt to compute `u8::MAX + 1_u8`, which would overflow
| ----------- ^^^^^^^^^^^ attempt to compute `u8::MAX + 1_u8`, which would overflow
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!

View file

@ -1,4 +1,4 @@
error[E0391]: cycle detected when elaborating drops for `<impl at $DIR/issue-24949-assoc-const-static-recursion-impl.rs:11:1: 13:2>::BAR`
error[E0391]: cycle detected when elaborating drops for `<impl at $DIR/issue-24949-assoc-const-static-recursion-impl.rs:11:1: 11:19>::BAR`
--> $DIR/issue-24949-assoc-const-static-recursion-impl.rs:12:22
|
LL | const BAR: u32 = IMPL_REF_BAR;
@ -8,23 +8,23 @@ note: ...which requires const-evaluating + checking `IMPL_REF_BAR`...
--> $DIR/issue-24949-assoc-const-static-recursion-impl.rs:7:1
|
LL | const IMPL_REF_BAR: u32 = GlobalImplRef::BAR;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires const-evaluating + checking `IMPL_REF_BAR`...
--> $DIR/issue-24949-assoc-const-static-recursion-impl.rs:7:1
|
LL | const IMPL_REF_BAR: u32 = GlobalImplRef::BAR;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires const-evaluating + checking `<impl at $DIR/issue-24949-assoc-const-static-recursion-impl.rs:11:1: 13:2>::BAR`...
| ^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires const-evaluating + checking `<impl at $DIR/issue-24949-assoc-const-static-recursion-impl.rs:11:1: 11:19>::BAR`...
--> $DIR/issue-24949-assoc-const-static-recursion-impl.rs:12:5
|
LL | const BAR: u32 = IMPL_REF_BAR;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires caching mir of `<impl at $DIR/issue-24949-assoc-const-static-recursion-impl.rs:11:1: 13:2>::BAR` for CTFE...
| ^^^^^^^^^^^^^^
note: ...which requires caching mir of `<impl at $DIR/issue-24949-assoc-const-static-recursion-impl.rs:11:1: 11:19>::BAR` for CTFE...
--> $DIR/issue-24949-assoc-const-static-recursion-impl.rs:12:5
|
LL | const BAR: u32 = IMPL_REF_BAR;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: ...which again requires elaborating drops for `<impl at $DIR/issue-24949-assoc-const-static-recursion-impl.rs:11:1: 13:2>::BAR`, completing the cycle
| ^^^^^^^^^^^^^^
= note: ...which again requires elaborating drops for `<impl at $DIR/issue-24949-assoc-const-static-recursion-impl.rs:11:1: 11:19>::BAR`, completing the cycle
= note: cycle used when running analysis passes on this crate
error: aborting due to previous error

View file

@ -8,22 +8,22 @@ note: ...which requires const-evaluating + checking `DEFAULT_REF_BAR`...
--> $DIR/issue-24949-assoc-const-static-recursion-trait-default.rs:11:1
|
LL | const DEFAULT_REF_BAR: u32 = <GlobalDefaultRef>::BAR;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires const-evaluating + checking `DEFAULT_REF_BAR`...
--> $DIR/issue-24949-assoc-const-static-recursion-trait-default.rs:11:1
|
LL | const DEFAULT_REF_BAR: u32 = <GlobalDefaultRef>::BAR;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires const-evaluating + checking `FooDefault::BAR`...
--> $DIR/issue-24949-assoc-const-static-recursion-trait-default.rs:8:5
|
LL | const BAR: u32 = DEFAULT_REF_BAR;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^
note: ...which requires caching mir of `FooDefault::BAR` for CTFE...
--> $DIR/issue-24949-assoc-const-static-recursion-trait-default.rs:8:5
|
LL | const BAR: u32 = DEFAULT_REF_BAR;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^
= note: ...which again requires elaborating drops for `FooDefault::BAR`, completing the cycle
= note: cycle used when running analysis passes on this crate

View file

@ -1,4 +1,4 @@
error[E0391]: cycle detected when elaborating drops for `<impl at $DIR/issue-24949-assoc-const-static-recursion-trait.rs:11:1: 13:2>::BAR`
error[E0391]: cycle detected when elaborating drops for `<impl at $DIR/issue-24949-assoc-const-static-recursion-trait.rs:11:1: 11:28>::BAR`
--> $DIR/issue-24949-assoc-const-static-recursion-trait.rs:12:22
|
LL | const BAR: u32 = TRAIT_REF_BAR;
@ -8,23 +8,23 @@ note: ...which requires const-evaluating + checking `TRAIT_REF_BAR`...
--> $DIR/issue-24949-assoc-const-static-recursion-trait.rs:7:1
|
LL | const TRAIT_REF_BAR: u32 = <GlobalTraitRef>::BAR;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires const-evaluating + checking `TRAIT_REF_BAR`...
--> $DIR/issue-24949-assoc-const-static-recursion-trait.rs:7:1
|
LL | const TRAIT_REF_BAR: u32 = <GlobalTraitRef>::BAR;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires const-evaluating + checking `<impl at $DIR/issue-24949-assoc-const-static-recursion-trait.rs:11:1: 13:2>::BAR`...
| ^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires const-evaluating + checking `<impl at $DIR/issue-24949-assoc-const-static-recursion-trait.rs:11:1: 11:28>::BAR`...
--> $DIR/issue-24949-assoc-const-static-recursion-trait.rs:12:5
|
LL | const BAR: u32 = TRAIT_REF_BAR;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires caching mir of `<impl at $DIR/issue-24949-assoc-const-static-recursion-trait.rs:11:1: 13:2>::BAR` for CTFE...
| ^^^^^^^^^^^^^^
note: ...which requires caching mir of `<impl at $DIR/issue-24949-assoc-const-static-recursion-trait.rs:11:1: 11:28>::BAR` for CTFE...
--> $DIR/issue-24949-assoc-const-static-recursion-trait.rs:12:5
|
LL | const BAR: u32 = TRAIT_REF_BAR;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: ...which again requires elaborating drops for `<impl at $DIR/issue-24949-assoc-const-static-recursion-trait.rs:11:1: 13:2>::BAR`, completing the cycle
| ^^^^^^^^^^^^^^
= note: ...which again requires elaborating drops for `<impl at $DIR/issue-24949-assoc-const-static-recursion-trait.rs:11:1: 11:28>::BAR`, completing the cycle
= note: cycle used when running analysis passes on this crate
error: aborting due to previous error

View file

@ -2,7 +2,7 @@ error[E0201]: duplicate definitions with name `bar`:
--> $DIR/associated-item-duplicate-names-2.rs:5:5
|
LL | const bar: bool = true;
| ----------------------- previous definition of `bar` here
| --------------- previous definition of `bar` here
LL | fn bar() {}
| ^^^^^^^^ duplicate definition

View file

@ -2,9 +2,9 @@ error[E0201]: duplicate definitions with name `Bar`:
--> $DIR/associated-item-duplicate-names-3.rs:14:5
|
LL | type Bar = i16;
| --------------- previous definition of `Bar` here
| -------- previous definition of `Bar` here
LL | type Bar = u16;
| ^^^^^^^^^^^^^^^ duplicate definition
| ^^^^^^^^ duplicate definition
error: aborting due to previous error

View file

@ -2,17 +2,17 @@ error[E0201]: duplicate definitions with name `Ty`:
--> $DIR/associated-item-duplicate-names.rs:11:5
|
LL | type Ty = ();
| ------------- previous definition of `Ty` here
| ------- previous definition of `Ty` here
LL | type Ty = usize;
| ^^^^^^^^^^^^^^^^ duplicate definition
| ^^^^^^^ duplicate definition
error[E0201]: duplicate definitions with name `BAR`:
--> $DIR/associated-item-duplicate-names.rs:13:5
|
LL | const BAR: u32 = 7;
| ------------------- previous definition of `BAR` here
| -------------- previous definition of `BAR` here
LL | const BAR: u32 = 8;
| ^^^^^^^^^^^^^^^^^^^ duplicate definition
| ^^^^^^^^^^^^^^ duplicate definition
error: aborting due to 2 previous errors

View file

@ -2,10 +2,10 @@ error[E0221]: ambiguous associated type `Color` in bounds of `C`
--> $DIR/associated-type-projection-ambig-between-bound-and-where-clause.rs:16:24
|
LL | type Color;
| ----------- ambiguous `Color` from `Vehicle`
| ---------- ambiguous `Color` from `Vehicle`
...
LL | type Color;
| ----------- ambiguous `Color` from `Box`
| ---------- ambiguous `Color` from `Box`
...
LL | fn a<C:Vehicle+Box>(_: C::Color) {
| ^^^^^^^^ ambiguous associated type `Color`
@ -23,10 +23,10 @@ error[E0221]: ambiguous associated type `Color` in bounds of `C`
--> $DIR/associated-type-projection-ambig-between-bound-and-where-clause.rs:20:12
|
LL | type Color;
| ----------- ambiguous `Color` from `Vehicle`
| ---------- ambiguous `Color` from `Vehicle`
...
LL | type Color;
| ----------- ambiguous `Color` from `Box`
| ---------- ambiguous `Color` from `Box`
...
LL | fn b<C>(_: C::Color) where C : Vehicle+Box {
| ^^^^^^^^ ambiguous associated type `Color`
@ -44,10 +44,10 @@ error[E0221]: ambiguous associated type `Color` in bounds of `C`
--> $DIR/associated-type-projection-ambig-between-bound-and-where-clause.rs:24:12
|
LL | type Color;
| ----------- ambiguous `Color` from `Vehicle`
| ---------- ambiguous `Color` from `Vehicle`
...
LL | type Color;
| ----------- ambiguous `Color` from `Box`
| ---------- ambiguous `Color` from `Box`
...
LL | fn c<C>(_: C::Color) where C : Vehicle, C : Box {
| ^^^^^^^^ ambiguous associated type `Color`
@ -65,10 +65,10 @@ error[E0221]: ambiguous associated type `Color` in bounds of `X`
--> $DIR/associated-type-projection-ambig-between-bound-and-where-clause.rs:35:20
|
LL | type Color;
| ----------- ambiguous `Color` from `Vehicle`
| ---------- ambiguous `Color` from `Vehicle`
...
LL | type Color;
| ----------- ambiguous `Color` from `Box`
| ---------- ambiguous `Color` from `Box`
...
LL | fn e(&self, _: X::Color) where X : Box;
| ^^^^^^^^ ambiguous associated type `Color`
@ -86,10 +86,10 @@ error[E0221]: ambiguous associated type `Color` in bounds of `X`
--> $DIR/associated-type-projection-ambig-between-bound-and-where-clause.rs:38:20
|
LL | type Color;
| ----------- ambiguous `Color` from `Vehicle`
| ---------- ambiguous `Color` from `Vehicle`
...
LL | type Color;
| ----------- ambiguous `Color` from `Box`
| ---------- ambiguous `Color` from `Box`
...
LL | fn f(&self, _: X::Color) where X : Box { }
| ^^^^^^^^ ambiguous associated type `Color`
@ -107,10 +107,10 @@ error[E0221]: ambiguous associated type `Color` in bounds of `X`
--> $DIR/associated-type-projection-ambig-between-bound-and-where-clause.rs:30:20
|
LL | type Color;
| ----------- ambiguous `Color` from `Vehicle`
| ---------- ambiguous `Color` from `Vehicle`
...
LL | type Color;
| ----------- ambiguous `Color` from `Box`
| ---------- ambiguous `Color` from `Box`
...
LL | fn d(&self, _: X::Color) where X : Box { }
| ^^^^^^^^ ambiguous associated type `Color`

View file

@ -10,10 +10,10 @@ error[E0221]: ambiguous associated type `Color` in bounds of `C`
--> $DIR/associated-type-projection-from-multiple-supertraits.rs:19:32
|
LL | type Color;
| ----------- ambiguous `Color` from `Vehicle`
| ---------- ambiguous `Color` from `Vehicle`
...
LL | type Color;
| ----------- ambiguous `Color` from `Box`
| ---------- ambiguous `Color` from `Box`
...
LL | fn dent<C:BoxCar>(c: C, color: C::Color) {
| ^^^^^^^^ ambiguous associated type `Color`
@ -31,10 +31,10 @@ error[E0222]: ambiguous associated type `Color` in bounds of `BoxCar`
--> $DIR/associated-type-projection-from-multiple-supertraits.rs:23:37
|
LL | type Color;
| ----------- ambiguous `Color` from `Vehicle`
| ---------- ambiguous `Color` from `Vehicle`
...
LL | type Color;
| ----------- ambiguous `Color` from `Box`
| ---------- ambiguous `Color` from `Box`
...
LL | fn dent_object<COLOR>(c: dyn BoxCar<Color=COLOR>) {
| ^^^^^^^^^^^ ambiguous associated type `Color`
@ -49,10 +49,10 @@ error[E0191]: the value of the associated types `Color` (from trait `Box`), `Col
--> $DIR/associated-type-projection-from-multiple-supertraits.rs:23:30
|
LL | type Color;
| ----------- `Vehicle::Color` defined here
| ---------- `Vehicle::Color` defined here
...
LL | type Color;
| ----------- `Box::Color` defined here
| ---------- `Box::Color` defined here
...
LL | fn dent_object<COLOR>(c: dyn BoxCar<Color=COLOR>) {
| ^^^^^^^^^^^^^^^^^^^ associated types `Color` (from trait `Vehicle`), `Color` (from trait `Box`) must be specified
@ -63,10 +63,10 @@ error[E0221]: ambiguous associated type `Color` in bounds of `C`
--> $DIR/associated-type-projection-from-multiple-supertraits.rs:28:29
|
LL | type Color;
| ----------- ambiguous `Color` from `Vehicle`
| ---------- ambiguous `Color` from `Vehicle`
...
LL | type Color;
| ----------- ambiguous `Color` from `Box`
| ---------- ambiguous `Color` from `Box`
...
LL | fn paint<C:BoxCar>(c: C, d: C::Color) {
| ^^^^^^^^ ambiguous associated type `Color`
@ -84,10 +84,10 @@ error[E0191]: the value of the associated types `Color` (from trait `Box`), `Col
--> $DIR/associated-type-projection-from-multiple-supertraits.rs:32:32
|
LL | type Color;
| ----------- `Vehicle::Color` defined here
| ---------- `Vehicle::Color` defined here
...
LL | type Color;
| ----------- `Box::Color` defined here
| ---------- `Box::Color` defined here
...
LL | fn dent_object_2<COLOR>(c: dyn BoxCar) where <dyn BoxCar as Vehicle>::Color = COLOR {
| ^^^^^^ associated types `Color` (from trait `Vehicle`), `Color` (from trait `Box`) must be specified

View file

@ -2,19 +2,19 @@ error[E0119]: conflicting implementations of trait `IntoCow<'_, _>` for type `Co
--> $DIR/associated-types-coherence-failure.rs:21:1
|
LL | impl<'a, B: ?Sized> IntoCow<'a, B> for <B as ToOwned>::Owned where B: ToOwned {
| ----------------------------------------------------------------------------- first implementation here
| ------------------------------------------------------------ first implementation here
...
LL | impl<'a, B: ?Sized> IntoCow<'a, B> for Cow<'a, B> where B: ToOwned {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Cow<'_, _>`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Cow<'_, _>`
error[E0119]: conflicting implementations of trait `IntoCow<'_, _>` for type `&_`
--> $DIR/associated-types-coherence-failure.rs:28:1
|
LL | impl<'a, B: ?Sized> IntoCow<'a, B> for <B as ToOwned>::Owned where B: ToOwned {
| ----------------------------------------------------------------------------- first implementation here
| ------------------------------------------------------------ first implementation here
...
LL | impl<'a, B: ?Sized> IntoCow<'a, B> for &'a B where B: ToOwned {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `&_`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `&_`
error: aborting due to 2 previous errors

View file

@ -2,7 +2,7 @@ error[E0191]: the value of the associated type `B` (from trait `Foo`) must be sp
--> $DIR/associated-types-incomplete-object.rs:23:30
|
LL | type B;
| ------- `B` defined here
| ------ `B` defined here
...
LL | let b = &42isize as &dyn Foo<A=usize>;
| ^^^^^^^^^^^^ help: specify the associated type: `Foo<A=usize, B = Type>`
@ -11,7 +11,7 @@ error[E0191]: the value of the associated type `A` (from trait `Foo`) must be sp
--> $DIR/associated-types-incomplete-object.rs:26:30
|
LL | type A;
| ------- `A` defined here
| ------ `A` defined here
...
LL | let c = &42isize as &dyn Foo<B=char>;
| ^^^^^^^^^^^ help: specify the associated type: `Foo<B=char, A = Type>`
@ -20,9 +20,9 @@ error[E0191]: the value of the associated types `A` (from trait `Foo`), `B` (fro
--> $DIR/associated-types-incomplete-object.rs:29:30
|
LL | type A;
| ------- `A` defined here
| ------ `A` defined here
LL | type B;
| ------- `B` defined here
| ------ `B` defined here
...
LL | let d = &42isize as &dyn Foo;
| ^^^ help: specify the associated types: `Foo<A = Type, B = Type>`

View file

@ -2,7 +2,7 @@ error[E0046]: not all trait items implemented, missing: `Type`
--> $DIR/associated-types-issue-17359.rs:8:1
|
LL | type Type;
| ---------- `Type` from trait
| --------- `Type` from trait
...
LL | impl Trait for isize {}
| ^^^^^^^^^^^^^^^^^^^^ missing `Type` in implementation

View file

@ -8,10 +8,10 @@ error[E0221]: ambiguous associated type `A` in bounds of `T`
--> $DIR/associated-types-path-1.rs:11:34
|
LL | type A;
| ------- ambiguous `A` from `Foo`
| ------ ambiguous `A` from `Foo`
...
LL | type A;
| ------- ambiguous `A` from `Bar`
| ------ ambiguous `A` from `Bar`
...
LL | pub fn f2<T: Foo + Bar>(a: T, x: T::A) {}
| ^^^^ ambiguous associated type `A`

View file

@ -2,7 +2,7 @@ error[E0046]: not all trait items implemented, missing: `Bar`
--> $DIR/defaults-mixed.rs:11:1
|
LL | type Bar;
| --------- `Bar` from trait
| -------- `Bar` from trait
...
LL | impl Trait for () {}
| ^^^^^^^^^^^^^^^^^ missing `Bar` in implementation
@ -11,7 +11,7 @@ error[E0046]: not all trait items implemented, missing: `Bar`
--> $DIR/defaults-mixed.rs:14:1
|
LL | type Bar;
| --------- `Bar` from trait
| -------- `Bar` from trait
...
LL | impl Trait for bool {
| ^^^^^^^^^^^^^^^^^^^ missing `Bar` in implementation

View file

@ -1,13 +1,8 @@
error[E0275]: overflow evaluating the requirement `for<'b> u32: X<'b>`
--> $DIR/hr-associated-type-bound-2.rs:11:1
|
LL | / impl X<'_> for u32
LL | | where
LL | | for<'b> <Self as X<'b>>::U: Clone,
LL | | {
LL | | type U = str;
LL | | }
| |_^
LL | impl X<'_> for u32
| ^^^^^^^^^^^^^^^^^^
|
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`hr_associated_type_bound_2`)
note: required because of the requirements on the impl of `for<'b> X<'b>` for `u32`

View file

@ -1,14 +1,8 @@
error[E0275]: overflow evaluating the requirement `<(T,) as Grault>::A == _`
--> $DIR/impl-wf-cycle-1.rs:15:1
|
LL | / impl<T: Grault> Grault for (T,)
LL | |
LL | | where
LL | | Self::A: Baz,
... |
LL | | type B = bool;
LL | | }
| |_^
LL | impl<T: Grault> Grault for (T,)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: required because of the requirements on the impl of `Grault` for `(T,)`
--> $DIR/impl-wf-cycle-1.rs:15:17

View file

@ -1,14 +1,8 @@
error[E0275]: overflow evaluating the requirement `<(T,) as Grault>::A == _`
--> $DIR/impl-wf-cycle-2.rs:7:1
|
LL | / impl<T: Grault> Grault for (T,)
LL | |
LL | | where
LL | | Self::A: Copy,
LL | | {
LL | | type A = ();
LL | | }
| |_^
LL | impl<T: Grault> Grault for (T,)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: required because of the requirements on the impl of `Grault` for `(T,)`
--> $DIR/impl-wf-cycle-2.rs:7:17

View file

@ -1,26 +1,22 @@
error[E0393]: the type parameter `Rhs` must be explicitly specified
--> $DIR/issue-22560.rs:9:23
|
LL | / trait Sub<Rhs=Self> {
LL | | type Output;
LL | | }
| |_- type parameter `Rhs` must be specified for this
LL |
LL | type Test = dyn Add + Sub;
| ^^^ help: set the type parameter to the desired type: `Sub<Rhs>`
LL | trait Sub<Rhs=Self> {
| ------------------- type parameter `Rhs` must be specified for this
...
LL | type Test = dyn Add + Sub;
| ^^^ help: set the type parameter to the desired type: `Sub<Rhs>`
|
= note: because of the default `Self` reference, type parameters must be specified on object types
error[E0393]: the type parameter `Rhs` must be explicitly specified
--> $DIR/issue-22560.rs:9:17
|
LL | / trait Add<Rhs=Self> {
LL | | type Output;
LL | | }
| |_- type parameter `Rhs` must be specified for this
LL | trait Add<Rhs=Self> {
| ------------------- type parameter `Rhs` must be specified for this
...
LL | type Test = dyn Add + Sub;
| ^^^ help: set the type parameter to the desired type: `Add<Rhs>`
LL | type Test = dyn Add + Sub;
| ^^^ help: set the type parameter to the desired type: `Add<Rhs>`
|
= note: because of the default `Self` reference, type parameters must be specified on object types
@ -39,10 +35,10 @@ error[E0191]: the value of the associated types `Output` (from trait `Add`), `Ou
--> $DIR/issue-22560.rs:9:17
|
LL | type Output;
| ------------ `Output` defined here
| ----------- `Output` defined here
...
LL | type Output;
| ------------ `Output` defined here
| ----------- `Output` defined here
...
LL | type Test = dyn Add + Sub;
| ^^^ ^^^ associated type `Output` must be specified

View file

@ -2,14 +2,11 @@ error[E0191]: the value of the associated types `ChildKey` (from trait `Hierarch
--> $DIR/issue-23595-1.rs:8:58
|
LL | type Value;
| ----------- `Value` defined here
| ---------- `Value` defined here
LL | type ChildKey;
| -------------- `ChildKey` defined here
| ------------- `ChildKey` defined here
LL | type Children = dyn Index<Self::ChildKey, Output=dyn Hierarchy>;
| -----------------------------------------------------^^^^^^^^^--
| | |
| | help: specify the associated types: `Hierarchy<Value = Type, ChildKey = Type, Children = Type>`
| `Children` defined here
| ------------- `Children` defined here ^^^^^^^^^ help: specify the associated types: `Hierarchy<Value = Type, ChildKey = Type, Children = Type>`
error: aborting due to previous error

View file

@ -5,10 +5,7 @@ LL | / pub trait ThriftService<Bug: NotFoo>:
LL | |
LL | |
LL | | Service<AssocType = <Bug as Foo>::OnlyFoo>
... |
LL | |
LL | | }
| |_^ the trait `Foo` is not implemented for `Bug`
| |______________________________________________^ the trait `Foo` is not implemented for `Bug`
|
help: consider further restricting this bound
|

View file

@ -2,7 +2,7 @@ error: layout error: NormalizationFailure(<[E] as std::borrow::ToOwned>::Owned,
--> $DIR/issue-85103.rs:6:1
|
LL | type Edges<'a, E> = Cow<'a, [E]>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^
error: aborting due to previous error

View file

@ -13,7 +13,7 @@ error[E0191]: the value of the associated types `A` (from trait `Y`), `Output` (
--> $DIR/missing-associated-types.rs:12:21
|
LL | type A;
| ------- `A` defined here
| ------ `A` defined here
...
LL | type Foo<Rhs> = dyn Add<Rhs> + Sub<Rhs> + X<Rhs> + Y<Rhs>;
| ^^^^^^^^ ^^^^^^^^ ^^^^^^ ^^^^^^ associated type `A` must be specified
@ -42,9 +42,9 @@ error[E0191]: the value of the associated types `A` (from trait `Z`), `B` (from
--> $DIR/missing-associated-types.rs:15:21
|
LL | type A;
| ------- `A` defined here
| ------ `A` defined here
LL | type B;
| ------- `B` defined here
| ------ `B` defined here
...
LL | type Bar<Rhs> = dyn Add<Rhs> + Sub<Rhs> + X<Rhs> + Z<Rhs>;
| ^^^^^^^^ ^^^^^^^^ ^^^^^^ ^^^^^^ associated types `A`, `B`, `Output` must be specified
@ -78,7 +78,7 @@ error[E0191]: the value of the associated types `A` (from trait `Y`), `Output` (
--> $DIR/missing-associated-types.rs:18:21
|
LL | type A;
| ------- `A` defined here
| ------ `A` defined here
...
LL | type Baz<Rhs> = dyn Add<Rhs> + Sub<Rhs> + Y<Rhs>;
| ^^^^^^^^ ^^^^^^^^ ^^^^^^ associated type `A` must be specified

View file

@ -2,7 +2,7 @@ error: cross-crate traits with a default impl, like `Send`, should not be specia
--> $DIR/suspicious-impls-lint.rs:9:1
|
LL | unsafe impl<T: Send> Send for MayImplementSendErr<&T> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: the lint level is defined here
--> $DIR/suspicious-impls-lint.rs:1:9
@ -16,13 +16,13 @@ note: try using the same sequence of generic parameters as the struct definition
--> $DIR/suspicious-impls-lint.rs:8:1
|
LL | struct MayImplementSendErr<T>(T);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: cross-crate traits with a default impl, like `Send`, should not be specialized
--> $DIR/suspicious-impls-lint.rs:21:1
|
LL | unsafe impl Send for ContainsVec<i32> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= warning: this will change its meaning in a future release!
= note: for more information, see issue #93367 <https://github.com/rust-lang/rust/issues/93367>
@ -31,13 +31,13 @@ note: try using the same sequence of generic parameters as the struct definition
--> $DIR/suspicious-impls-lint.rs:20:1
|
LL | struct ContainsVec<T>(Vec<T>);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^^^
error: cross-crate traits with a default impl, like `Send`, should not be specialized
--> $DIR/suspicious-impls-lint.rs:32:1
|
LL | unsafe impl<T: Send> Send for TwoParamsSame<T, T> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= warning: this will change its meaning in a future release!
= note: for more information, see issue #93367 <https://github.com/rust-lang/rust/issues/93367>
@ -46,13 +46,13 @@ note: try using the same sequence of generic parameters as the struct definition
--> $DIR/suspicious-impls-lint.rs:31:1
|
LL | struct TwoParamsSame<T, U>(T, U);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
error: cross-crate traits with a default impl, like `Send`, should not be specialized
--> $DIR/suspicious-impls-lint.rs:40:1
|
LL | unsafe impl<T> Send for WithPhantomDataSend<*const T, i8> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= warning: this will change its meaning in a future release!
= note: for more information, see issue #93367 <https://github.com/rust-lang/rust/issues/93367>
@ -61,13 +61,13 @@ note: try using the same sequence of generic parameters as the struct definition
--> $DIR/suspicious-impls-lint.rs:39:1
|
LL | pub struct WithPhantomDataSend<T, U>(PhantomData<T>, U);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: cross-crate traits with a default impl, like `Sync`, should not be specialized
--> $DIR/suspicious-impls-lint.rs:46:1
|
LL | unsafe impl<T> Sync for WithLifetime<'static, Vec<T>> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= warning: this will change its meaning in a future release!
= note: for more information, see issue #93367 <https://github.com/rust-lang/rust/issues/93367>
@ -76,7 +76,7 @@ note: try using the same sequence of generic parameters as the struct definition
--> $DIR/suspicious-impls-lint.rs:44:1
|
LL | pub struct WithLifetime<'a, T>(&'a (), T);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 5 previous errors

View file

@ -10,18 +10,12 @@ note: an implementation of `Add<_>` might be missing for `A`
--> $DIR/issue-28837.rs:1:1
|
LL | struct A;
| ^^^^^^^^^ must implement `Add<_>`
| ^^^^^^^^ must implement `Add<_>`
note: the following trait must be implemented
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
LL | / pub trait Add<Rhs = Self> {
LL | | /// The resulting type after applying the `+` operator.
LL | | #[stable(feature = "rust1", since = "1.0.0")]
LL | | type Output;
... |
LL | | fn add(self, rhs: Rhs) -> Self::Output;
LL | | }
| |_^
LL | pub trait Add<Rhs = Self> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0369]: cannot subtract `A` from `A`
--> $DIR/issue-28837.rs:8:7
@ -35,18 +29,12 @@ note: an implementation of `Sub<_>` might be missing for `A`
--> $DIR/issue-28837.rs:1:1
|
LL | struct A;
| ^^^^^^^^^ must implement `Sub<_>`
| ^^^^^^^^ must implement `Sub<_>`
note: the following trait must be implemented
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
LL | / pub trait Sub<Rhs = Self> {
LL | | /// The resulting type after applying the `-` operator.
LL | | #[stable(feature = "rust1", since = "1.0.0")]
LL | | type Output;
... |
LL | | fn sub(self, rhs: Rhs) -> Self::Output;
LL | | }
| |_^
LL | pub trait Sub<Rhs = Self> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0369]: cannot multiply `A` by `A`
--> $DIR/issue-28837.rs:10:7
@ -60,18 +48,12 @@ note: an implementation of `Mul<_>` might be missing for `A`
--> $DIR/issue-28837.rs:1:1
|
LL | struct A;
| ^^^^^^^^^ must implement `Mul<_>`
| ^^^^^^^^ must implement `Mul<_>`
note: the following trait must be implemented
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
LL | / pub trait Mul<Rhs = Self> {
LL | | /// The resulting type after applying the `*` operator.
LL | | #[stable(feature = "rust1", since = "1.0.0")]
LL | | type Output;
... |
LL | | fn mul(self, rhs: Rhs) -> Self::Output;
LL | | }
| |_^
LL | pub trait Mul<Rhs = Self> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0369]: cannot divide `A` by `A`
--> $DIR/issue-28837.rs:12:7
@ -85,18 +67,12 @@ note: an implementation of `Div<_>` might be missing for `A`
--> $DIR/issue-28837.rs:1:1
|
LL | struct A;
| ^^^^^^^^^ must implement `Div<_>`
| ^^^^^^^^ must implement `Div<_>`
note: the following trait must be implemented
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
LL | / pub trait Div<Rhs = Self> {
LL | | /// The resulting type after applying the `/` operator.
LL | | #[stable(feature = "rust1", since = "1.0.0")]
LL | | type Output;
... |
LL | | fn div(self, rhs: Rhs) -> Self::Output;
LL | | }
| |_^
LL | pub trait Div<Rhs = Self> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0369]: cannot mod `A` by `A`
--> $DIR/issue-28837.rs:14:7
@ -110,18 +86,12 @@ note: an implementation of `Rem<_>` might be missing for `A`
--> $DIR/issue-28837.rs:1:1
|
LL | struct A;
| ^^^^^^^^^ must implement `Rem<_>`
| ^^^^^^^^ must implement `Rem<_>`
note: the following trait must be implemented
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
LL | / pub trait Rem<Rhs = Self> {
LL | | /// The resulting type after applying the `%` operator.
LL | | #[stable(feature = "rust1", since = "1.0.0")]
LL | | type Output;
... |
LL | | fn rem(self, rhs: Rhs) -> Self::Output;
LL | | }
| |_^
LL | pub trait Rem<Rhs = Self> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0369]: no implementation for `A & A`
--> $DIR/issue-28837.rs:16:7
@ -135,18 +105,12 @@ note: an implementation of `BitAnd<_>` might be missing for `A`
--> $DIR/issue-28837.rs:1:1
|
LL | struct A;
| ^^^^^^^^^ must implement `BitAnd<_>`
| ^^^^^^^^ must implement `BitAnd<_>`
note: the following trait must be implemented
--> $SRC_DIR/core/src/ops/bit.rs:LL:COL
|
LL | / pub trait BitAnd<Rhs = Self> {
LL | | /// The resulting type after applying the `&` operator.
LL | | #[stable(feature = "rust1", since = "1.0.0")]
LL | | type Output;
... |
LL | | fn bitand(self, rhs: Rhs) -> Self::Output;
LL | | }
| |_^
LL | pub trait BitAnd<Rhs = Self> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0369]: no implementation for `A | A`
--> $DIR/issue-28837.rs:18:7
@ -160,18 +124,12 @@ note: an implementation of `BitOr<_>` might be missing for `A`
--> $DIR/issue-28837.rs:1:1
|
LL | struct A;
| ^^^^^^^^^ must implement `BitOr<_>`
| ^^^^^^^^ must implement `BitOr<_>`
note: the following trait must be implemented
--> $SRC_DIR/core/src/ops/bit.rs:LL:COL
|
LL | / pub trait BitOr<Rhs = Self> {
LL | | /// The resulting type after applying the `|` operator.
LL | | #[stable(feature = "rust1", since = "1.0.0")]
LL | | type Output;
... |
LL | | fn bitor(self, rhs: Rhs) -> Self::Output;
LL | | }
| |_^
LL | pub trait BitOr<Rhs = Self> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0369]: no implementation for `A << A`
--> $DIR/issue-28837.rs:20:7
@ -185,18 +143,12 @@ note: an implementation of `Shl<_>` might be missing for `A`
--> $DIR/issue-28837.rs:1:1
|
LL | struct A;
| ^^^^^^^^^ must implement `Shl<_>`
| ^^^^^^^^ must implement `Shl<_>`
note: the following trait must be implemented
--> $SRC_DIR/core/src/ops/bit.rs:LL:COL
|
LL | / pub trait Shl<Rhs = Self> {
LL | | /// The resulting type after applying the `<<` operator.
LL | | #[stable(feature = "rust1", since = "1.0.0")]
LL | | type Output;
... |
LL | | fn shl(self, rhs: Rhs) -> Self::Output;
LL | | }
| |_^
LL | pub trait Shl<Rhs = Self> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0369]: no implementation for `A >> A`
--> $DIR/issue-28837.rs:22:7
@ -210,18 +162,12 @@ note: an implementation of `Shr<_>` might be missing for `A`
--> $DIR/issue-28837.rs:1:1
|
LL | struct A;
| ^^^^^^^^^ must implement `Shr<_>`
| ^^^^^^^^ must implement `Shr<_>`
note: the following trait must be implemented
--> $SRC_DIR/core/src/ops/bit.rs:LL:COL
|
LL | / pub trait Shr<Rhs = Self> {
LL | | /// The resulting type after applying the `>>` operator.
LL | | #[stable(feature = "rust1", since = "1.0.0")]
LL | | type Output;
... |
LL | | fn shr(self, rhs: Rhs) -> Self::Output;
LL | | }
| |_^
LL | pub trait Shr<Rhs = Self> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0369]: binary operation `==` cannot be applied to type `A`
--> $DIR/issue-28837.rs:24:7
@ -235,7 +181,7 @@ note: an implementation of `PartialEq<_>` might be missing for `A`
--> $DIR/issue-28837.rs:1:1
|
LL | struct A;
| ^^^^^^^^^ must implement `PartialEq<_>`
| ^^^^^^^^ must implement `PartialEq<_>`
help: consider annotating `A` with `#[derive(PartialEq)]`
|
LL | #[derive(PartialEq)]
@ -253,7 +199,7 @@ note: an implementation of `PartialEq<_>` might be missing for `A`
--> $DIR/issue-28837.rs:1:1
|
LL | struct A;
| ^^^^^^^^^ must implement `PartialEq<_>`
| ^^^^^^^^ must implement `PartialEq<_>`
help: consider annotating `A` with `#[derive(PartialEq)]`
|
LL | #[derive(PartialEq)]
@ -271,7 +217,7 @@ note: an implementation of `PartialOrd<_>` might be missing for `A`
--> $DIR/issue-28837.rs:1:1
|
LL | struct A;
| ^^^^^^^^^ must implement `PartialOrd<_>`
| ^^^^^^^^ must implement `PartialOrd<_>`
help: consider annotating `A` with `#[derive(PartialEq, PartialOrd)]`
|
LL | #[derive(PartialEq, PartialOrd)]
@ -289,7 +235,7 @@ note: an implementation of `PartialOrd<_>` might be missing for `A`
--> $DIR/issue-28837.rs:1:1
|
LL | struct A;
| ^^^^^^^^^ must implement `PartialOrd<_>`
| ^^^^^^^^ must implement `PartialOrd<_>`
help: consider annotating `A` with `#[derive(PartialEq, PartialOrd)]`
|
LL | #[derive(PartialEq, PartialOrd)]
@ -307,7 +253,7 @@ note: an implementation of `PartialOrd<_>` might be missing for `A`
--> $DIR/issue-28837.rs:1:1
|
LL | struct A;
| ^^^^^^^^^ must implement `PartialOrd<_>`
| ^^^^^^^^ must implement `PartialOrd<_>`
help: consider annotating `A` with `#[derive(PartialEq, PartialOrd)]`
|
LL | #[derive(PartialEq, PartialOrd)]
@ -325,7 +271,7 @@ note: an implementation of `PartialOrd<_>` might be missing for `A`
--> $DIR/issue-28837.rs:1:1
|
LL | struct A;
| ^^^^^^^^^ must implement `PartialOrd<_>`
| ^^^^^^^^ must implement `PartialOrd<_>`
help: consider annotating `A` with `#[derive(PartialEq, PartialOrd)]`
|
LL | #[derive(PartialEq, PartialOrd)]

View file

@ -14,14 +14,8 @@ LL | struct Thing {
note: the following trait must be implemented
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
LL | / pub trait Mul<Rhs = Self> {
LL | | /// The resulting type after applying the `*` operator.
LL | | #[stable(feature = "rust1", since = "1.0.0")]
LL | | type Output;
... |
LL | | fn mul(self, rhs: Rhs) -> Self::Output;
LL | | }
| |_^
LL | pub trait Mul<Rhs = Self> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error

View file

@ -2,7 +2,7 @@ error[E0308]: mismatched types
--> $DIR/blind-item-block-middle.rs:6:9
|
LL | mod foo { pub struct bar; }
| --------------- unit struct defined here
| -------------- unit struct defined here
...
LL | let bar = 5;
| ^^^ - this expression has type `{integer}`

View file

@ -13,7 +13,7 @@ note: deref defined here
--> $DIR/issue-81365-1.rs:12:5
|
LL | type Target = DerefTarget;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^
error: aborting due to previous error

View file

@ -13,7 +13,7 @@ note: deref defined here
--> $DIR/issue-81365-2.rs:12:5
|
LL | type Target = DerefTarget;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^
error: aborting due to previous error

View file

@ -13,7 +13,7 @@ note: deref defined here
--> $DIR/issue-81365-3.rs:23:5
|
LL | type Target = Container;
| ^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^
error: aborting due to previous error

View file

@ -13,7 +13,7 @@ note: deref defined here
--> $DIR/issue-81365-4.rs:24:5
|
LL | type Target = Container;
| ^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^
error: aborting due to previous error

View file

@ -13,7 +13,7 @@ note: deref defined here
--> $DIR/issue-81365-5.rs:19:5
|
LL | type Target = DerefTarget;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^
error: aborting due to previous error

View file

@ -13,7 +13,7 @@ note: deref defined here
--> $DIR/issue-81365-6.rs:9:5
|
LL | type Target = [()];
| ^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^
error: aborting due to previous error

View file

@ -13,7 +13,7 @@ note: deref defined here
--> $DIR/issue-81365-7.rs:12:5
|
LL | type Target = DerefTarget;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^
error: aborting due to previous error

View file

@ -13,7 +13,7 @@ note: deref defined here
--> $DIR/issue-81365-8.rs:12:5
|
LL | type Target = DerefTarget;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^
error: aborting due to previous error

View file

@ -16,9 +16,7 @@ error: any use of this value will cause an error
--> $DIR/issue-81899.rs:4:23
|
LL | const _CONST: &[u8] = &f(&[], |_| {});
| ----------------------^^^^^^^^^^^^^^^-
| |
| referenced constant has errors
| ------------------- ^^^^^^^^^^^^^^^ referenced constant has errors
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@ -32,9 +30,7 @@ error: any use of this value will cause an error
--> $DIR/issue-81899.rs:4:23
|
LL | const _CONST: &[u8] = &f(&[], |_| {});
| ----------------------^^^^^^^^^^^^^^^-
| |
| referenced constant has errors
| ------------------- ^^^^^^^^^^^^^^^ referenced constant has errors
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!

View file

@ -16,9 +16,7 @@ error: any use of this value will cause an error
--> $DIR/issue-88434-minimal-example.rs:3:21
|
LL | const _CONST: &() = &f(&|_| {});
| --------------------^^^^^^^^^^^-
| |
| referenced constant has errors
| ----------------- ^^^^^^^^^^^ referenced constant has errors
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@ -32,9 +30,7 @@ error: any use of this value will cause an error
--> $DIR/issue-88434-minimal-example.rs:3:21
|
LL | const _CONST: &() = &f(&|_| {});
| --------------------^^^^^^^^^^^-
| |
| referenced constant has errors
| ----------------- ^^^^^^^^^^^ referenced constant has errors
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!

View file

@ -16,9 +16,7 @@ error: any use of this value will cause an error
--> $DIR/issue-88434-removal-index-should-be-less.rs:3:23
|
LL | const _CONST: &[u8] = &f(&[], |_| {});
| ----------------------^^^^^^^^^^^^^^^-
| |
| referenced constant has errors
| ------------------- ^^^^^^^^^^^^^^^ referenced constant has errors
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@ -32,9 +30,7 @@ error: any use of this value will cause an error
--> $DIR/issue-88434-removal-index-should-be-less.rs:3:23
|
LL | const _CONST: &[u8] = &f(&[], |_| {});
| ----------------------^^^^^^^^^^^^^^^-
| |
| referenced constant has errors
| ------------------- ^^^^^^^^^^^^^^^ referenced constant has errors
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!

View file

@ -25,7 +25,7 @@ note: `E1` defined here
--> $DIR/auxiliary/match_non_exhaustive_lib.rs:2:1
|
LL | pub enum E1 {}
| ^^^^^^^^^^^^^^
| ^^^^^^^^^^^
= note: the matched value is of type `E1`, which is marked as non-exhaustive
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
|
@ -44,7 +44,7 @@ note: `E2` defined here
--> $DIR/auxiliary/match_non_exhaustive_lib.rs:5:1
|
LL | pub enum E2 { A, B }
| ^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^
= note: the matched value is of type `E2`, which is marked as non-exhaustive
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|

View file

@ -10,7 +10,7 @@ error[E0119]: conflicting implementations of trait `Foo<_>` for type `i32`
--> $DIR/coherence-overlap-downstream.rs:14:1
|
LL | impl<X, T> Foo<X> for T where T: Bar<X> {}
| --------------------------------------- first implementation here
| ----------------------- first implementation here
LL | impl<X> Foo<X> for i32 {}
| ^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `i32`
|

View file

@ -2,7 +2,7 @@ error[E0119]: conflicting implementations of trait `Foo` for type `i16`
--> $DIR/coherence-overlap-upstream.rs:13:1
|
LL | impl<T> Foo for T where T: Remote {}
| --------------------------------- first implementation here
| ----------------- first implementation here
LL | impl Foo for i16 {}
| ^^^^^^^^^^^^^^^^ conflicting implementation for `i16`
|

View file

@ -1,22 +1,11 @@
error: conflicting implementations of trait `IntoWasmAbi` for type `&dyn std::ops::Fn(&_) -> _`
--> $DIR/coherence-wasm-bindgen.rs:28:1
|
LL | / impl<'a, 'b, A, R> IntoWasmAbi for &'a (dyn Fn(A) -> R + 'b)
LL | | where
LL | | A: FromWasmAbi,
LL | | R: ReturnWasmAbi,
LL | | {
LL | | }
| |_- first implementation here
LL | impl<'a, 'b, A, R> IntoWasmAbi for &'a (dyn Fn(A) -> R + 'b)
| ------------------------------------------------------------ first implementation here
...
LL | / impl<'a, 'b, A, R> IntoWasmAbi for &'a (dyn for<'x> Fn(&'x A) -> R + 'b)
LL | | where
LL | | A: RefFromWasmAbi,
LL | | R: ReturnWasmAbi,
... |
LL | |
LL | | }
| |_^ conflicting implementation for `&dyn std::ops::Fn(&_) -> _`
LL | impl<'a, 'b, A, R> IntoWasmAbi for &'a (dyn for<'x> Fn(&'x A) -> R + 'b)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `&dyn std::ops::Fn(&_) -> _`
|
note: the lint level is defined here
--> $DIR/coherence-wasm-bindgen.rs:10:9

View file

@ -21,72 +21,61 @@ error[E0587]: type has conflicting packed and align representation hints
--> $DIR/conflicting-repr-hints.rs:29:1
|
LL | struct F(i32);
| ^^^^^^^^^^^^^^
| ^^^^^^^^
error[E0587]: type has conflicting packed and align representation hints
--> $DIR/conflicting-repr-hints.rs:33:1
|
LL | struct G(i32);
| ^^^^^^^^^^^^^^
| ^^^^^^^^
error[E0587]: type has conflicting packed and align representation hints
--> $DIR/conflicting-repr-hints.rs:37:1
|
LL | struct H(i32);
| ^^^^^^^^^^^^^^
| ^^^^^^^^
error[E0634]: type has conflicting packed representation hints
--> $DIR/conflicting-repr-hints.rs:40:1
|
LL | struct I(i32);
| ^^^^^^^^^^^^^^
| ^^^^^^^^
error[E0634]: type has conflicting packed representation hints
--> $DIR/conflicting-repr-hints.rs:44:1
|
LL | struct J(i32);
| ^^^^^^^^^^^^^^
| ^^^^^^^^
error[E0587]: type has conflicting packed and align representation hints
--> $DIR/conflicting-repr-hints.rs:50:1
|
LL | / union X {
LL | |
LL | | i: i32,
LL | | }
| |_^
LL | union X {
| ^^^^^^^
error[E0587]: type has conflicting packed and align representation hints
--> $DIR/conflicting-repr-hints.rs:57:1
|
LL | / union Y {
LL | |
LL | | i: i32,
LL | | }
| |_^
LL | union Y {
| ^^^^^^^
error[E0587]: type has conflicting packed and align representation hints
--> $DIR/conflicting-repr-hints.rs:64:1
|
LL | / union Z {
LL | |
LL | | i: i32,
LL | | }
| |_^
LL | union Z {
| ^^^^^^^
error[E0587]: type has conflicting packed and align representation hints
--> $DIR/conflicting-repr-hints.rs:70:1
|
LL | pub struct S(u16);
| ^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^
error[E0587]: type has conflicting packed and align representation hints
--> $DIR/conflicting-repr-hints.rs:73:1
|
LL | / pub union U {
LL | | u: u16
LL | | }
| |_^
LL | pub union U {
| ^^^^^^^^^^^
error: aborting due to 12 previous errors

View file

@ -2,7 +2,7 @@ error[E0446]: private type `fn(u8) -> u8 {my_const_fn}` in public interface
--> $DIR/eval-privacy.rs:16:5
|
LL | type AssocTy = Const<{ my_const_fn(U) }>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
| ^^^^^^^^^^^^ can't leak private type
...
LL | const fn my_const_fn(val: u8) -> u8 {
| ----------------------------------- `fn(u8) -> u8 {my_const_fn}` declared as private

View file

@ -2,7 +2,7 @@ error[E0391]: cycle detected when resolving instance `<LazyUpdim<T, { T::DIM },
--> $DIR/issue-83765.rs:5:5
|
LL | const DIM: usize;
| ^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^
|
note: ...which requires checking if `TensorDimension` fulfills its obligations...
--> $DIR/issue-83765.rs:4:1

View file

@ -44,7 +44,7 @@ error[E0080]: it is undefined behavior to use this value
--> $DIR/forbidden_slices.rs:26:1
|
LL | pub static S4: &[u8] = unsafe { from_raw_parts((&D1) as *const _ as _, 1) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered uninitialized bytes
| ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered uninitialized bytes
|
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
= note: the raw bytes of the constant (size: 8, align: 4) {
@ -55,7 +55,7 @@ error[E0080]: it is undefined behavior to use this value
--> $DIR/forbidden_slices.rs:28:1
|
LL | pub static S5: &[u8] = unsafe { from_raw_parts((&D3) as *const _ as _, size_of::<&u32>()) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>: encountered a pointer, but expected plain (non-pointer) bytes
| ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>: encountered a pointer, but expected plain (non-pointer) bytes
|
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
= note: the raw bytes of the constant (size: 8, align: 4) {
@ -66,7 +66,7 @@ error[E0080]: it is undefined behavior to use this value
--> $DIR/forbidden_slices.rs:30:1
|
LL | pub static S6: &[bool] = unsafe { from_raw_parts((&D0) as *const _ as _, 4) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered 0x11, but expected a boolean
| ^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered 0x11, but expected a boolean
|
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
= note: the raw bytes of the constant (size: 8, align: 4) {
@ -76,13 +76,8 @@ LL | pub static S6: &[bool] = unsafe { from_raw_parts((&D0) as *const _ as _, 4)
error[E0080]: it is undefined behavior to use this value
--> $DIR/forbidden_slices.rs:33:1
|
LL | / pub static S7: &[u16] = unsafe {
LL | |
LL | | let ptr = (&D2 as *const Struct as *const u16).byte_add(1);
LL | |
LL | | from_raw_parts(ptr, 4)
LL | | };
| |__^ constructing invalid value: encountered an unaligned reference (required 2 byte alignment but found 1)
LL | pub static S7: &[u16] = unsafe {
| ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered an unaligned reference (required 2 byte alignment but found 1)
|
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
= note: the raw bytes of the constant (size: 8, align: 4) {
@ -163,12 +158,8 @@ LL | from_ptr_range(ptr..ptr.add(2))
error[E0080]: it is undefined behavior to use this value
--> $DIR/forbidden_slices.rs:53:1
|
LL | / pub static R4: &[u8] = unsafe {
LL | |
LL | | let ptr = (&D1) as *const MaybeUninit<&u32> as *const u8;
LL | | from_ptr_range(ptr..ptr.add(1))
LL | | };
| |__^ constructing invalid value at .<deref>[0]: encountered uninitialized bytes
LL | pub static R4: &[u8] = unsafe {
| ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered uninitialized bytes
|
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
= note: the raw bytes of the constant (size: 8, align: 4) {
@ -178,12 +169,8 @@ LL | | };
error[E0080]: it is undefined behavior to use this value
--> $DIR/forbidden_slices.rs:58:1
|
LL | / pub static R5: &[u8] = unsafe {
LL | |
LL | | let ptr = &D3 as *const &u32;
LL | | from_ptr_range(ptr.cast()..ptr.add(1).cast())
LL | | };
| |__^ constructing invalid value at .<deref>: encountered a pointer, but expected plain (non-pointer) bytes
LL | pub static R5: &[u8] = unsafe {
| ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>: encountered a pointer, but expected plain (non-pointer) bytes
|
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
= note: the raw bytes of the constant (size: 8, align: 4) {
@ -193,12 +180,8 @@ LL | | };
error[E0080]: it is undefined behavior to use this value
--> $DIR/forbidden_slices.rs:63:1
|
LL | / pub static R6: &[bool] = unsafe {
LL | |
LL | | let ptr = &D0 as *const u32 as *const bool;
LL | | from_ptr_range(ptr..ptr.add(4))
LL | | };
| |__^ constructing invalid value at .<deref>[0]: encountered 0x11, but expected a boolean
LL | pub static R6: &[bool] = unsafe {
| ^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered 0x11, but expected a boolean
|
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
= note: the raw bytes of the constant (size: 8, align: 4) {
@ -208,12 +191,8 @@ LL | | };
error[E0080]: it is undefined behavior to use this value
--> $DIR/forbidden_slices.rs:68:1
|
LL | / pub static R7: &[u16] = unsafe {
LL | |
LL | | let ptr = (&D2 as *const Struct as *const u16).byte_add(1);
LL | | from_ptr_range(ptr..ptr.add(4))
LL | | };
| |__^ constructing invalid value: encountered an unaligned reference (required 2 byte alignment but found 1)
LL | pub static R7: &[u16] = unsafe {
| ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered an unaligned reference (required 2 byte alignment but found 1)
|
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
= note: the raw bytes of the constant (size: 8, align: 4) {

View file

@ -44,7 +44,7 @@ error[E0080]: it is undefined behavior to use this value
--> $DIR/forbidden_slices.rs:26:1
|
LL | pub static S4: &[u8] = unsafe { from_raw_parts((&D1) as *const _ as _, 1) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered uninitialized bytes
| ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered uninitialized bytes
|
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
= note: the raw bytes of the constant (size: 16, align: 8) {
@ -55,7 +55,7 @@ error[E0080]: it is undefined behavior to use this value
--> $DIR/forbidden_slices.rs:28:1
|
LL | pub static S5: &[u8] = unsafe { from_raw_parts((&D3) as *const _ as _, size_of::<&u32>()) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>: encountered a pointer, but expected plain (non-pointer) bytes
| ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>: encountered a pointer, but expected plain (non-pointer) bytes
|
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
= note: the raw bytes of the constant (size: 16, align: 8) {
@ -66,7 +66,7 @@ error[E0080]: it is undefined behavior to use this value
--> $DIR/forbidden_slices.rs:30:1
|
LL | pub static S6: &[bool] = unsafe { from_raw_parts((&D0) as *const _ as _, 4) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered 0x11, but expected a boolean
| ^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered 0x11, but expected a boolean
|
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
= note: the raw bytes of the constant (size: 16, align: 8) {
@ -76,13 +76,8 @@ LL | pub static S6: &[bool] = unsafe { from_raw_parts((&D0) as *const _ as _, 4)
error[E0080]: it is undefined behavior to use this value
--> $DIR/forbidden_slices.rs:33:1
|
LL | / pub static S7: &[u16] = unsafe {
LL | |
LL | | let ptr = (&D2 as *const Struct as *const u16).byte_add(1);
LL | |
LL | | from_raw_parts(ptr, 4)
LL | | };
| |__^ constructing invalid value: encountered an unaligned reference (required 2 byte alignment but found 1)
LL | pub static S7: &[u16] = unsafe {
| ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered an unaligned reference (required 2 byte alignment but found 1)
|
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
= note: the raw bytes of the constant (size: 16, align: 8) {
@ -163,12 +158,8 @@ LL | from_ptr_range(ptr..ptr.add(2))
error[E0080]: it is undefined behavior to use this value
--> $DIR/forbidden_slices.rs:53:1
|
LL | / pub static R4: &[u8] = unsafe {
LL | |
LL | | let ptr = (&D1) as *const MaybeUninit<&u32> as *const u8;
LL | | from_ptr_range(ptr..ptr.add(1))
LL | | };
| |__^ constructing invalid value at .<deref>[0]: encountered uninitialized bytes
LL | pub static R4: &[u8] = unsafe {
| ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered uninitialized bytes
|
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
= note: the raw bytes of the constant (size: 16, align: 8) {
@ -178,12 +169,8 @@ LL | | };
error[E0080]: it is undefined behavior to use this value
--> $DIR/forbidden_slices.rs:58:1
|
LL | / pub static R5: &[u8] = unsafe {
LL | |
LL | | let ptr = &D3 as *const &u32;
LL | | from_ptr_range(ptr.cast()..ptr.add(1).cast())
LL | | };
| |__^ constructing invalid value at .<deref>: encountered a pointer, but expected plain (non-pointer) bytes
LL | pub static R5: &[u8] = unsafe {
| ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>: encountered a pointer, but expected plain (non-pointer) bytes
|
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
= note: the raw bytes of the constant (size: 16, align: 8) {
@ -193,12 +180,8 @@ LL | | };
error[E0080]: it is undefined behavior to use this value
--> $DIR/forbidden_slices.rs:63:1
|
LL | / pub static R6: &[bool] = unsafe {
LL | |
LL | | let ptr = &D0 as *const u32 as *const bool;
LL | | from_ptr_range(ptr..ptr.add(4))
LL | | };
| |__^ constructing invalid value at .<deref>[0]: encountered 0x11, but expected a boolean
LL | pub static R6: &[bool] = unsafe {
| ^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered 0x11, but expected a boolean
|
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
= note: the raw bytes of the constant (size: 16, align: 8) {
@ -208,12 +191,8 @@ LL | | };
error[E0080]: it is undefined behavior to use this value
--> $DIR/forbidden_slices.rs:68:1
|
LL | / pub static R7: &[u16] = unsafe {
LL | |
LL | | let ptr = (&D2 as *const Struct as *const u16).byte_add(1);
LL | | from_ptr_range(ptr..ptr.add(4))
LL | | };
| |__^ constructing invalid value: encountered an unaligned reference (required 2 byte alignment but found 1)
LL | pub static R7: &[u16] = unsafe {
| ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered an unaligned reference (required 2 byte alignment but found 1)
|
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
= note: the raw bytes of the constant (size: 16, align: 8) {

View file

@ -1,11 +1,10 @@
error: any use of this value will cause an error
--> $DIR/assert-type-intrinsics.rs:14:9
|
LL | / const _BAD1: () = unsafe {
LL | | MaybeUninit::<!>::uninit().assume_init();
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ aborted execution: attempted to instantiate uninhabited type `!`
LL | | };
| |______-
LL | const _BAD1: () = unsafe {
| ---------------
LL | MaybeUninit::<!>::uninit().assume_init();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ aborted execution: attempted to instantiate uninhabited type `!`
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@ -14,11 +13,10 @@ LL | | };
error: any use of this value will cause an error
--> $DIR/assert-type-intrinsics.rs:17:9
|
LL | / const _BAD2: () = unsafe {
LL | | intrinsics::assert_uninit_valid::<bool>();
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ aborted execution: attempted to leave type `bool` uninitialized, which is invalid
LL | | };
| |______-
LL | const _BAD2: () = unsafe {
| ---------------
LL | intrinsics::assert_uninit_valid::<bool>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ aborted execution: attempted to leave type `bool` uninitialized, which is invalid
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -26,11 +24,10 @@ LL | | };
error: any use of this value will cause an error
--> $DIR/assert-type-intrinsics.rs:20:9
|
LL | / const _BAD3: () = unsafe {
LL | | intrinsics::assert_zero_valid::<&'static i32>();
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ aborted execution: attempted to zero-initialize type `&i32`, which is invalid
LL | | };
| |______-
LL | const _BAD3: () = unsafe {
| ---------------
LL | intrinsics::assert_zero_valid::<&'static i32>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ aborted execution: attempted to zero-initialize type `&i32`, which is invalid
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -41,11 +38,10 @@ Future incompatibility report: Future breakage diagnostic:
error: any use of this value will cause an error
--> $DIR/assert-type-intrinsics.rs:14:9
|
LL | / const _BAD1: () = unsafe {
LL | | MaybeUninit::<!>::uninit().assume_init();
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ aborted execution: attempted to instantiate uninhabited type `!`
LL | | };
| |______-
LL | const _BAD1: () = unsafe {
| ---------------
LL | MaybeUninit::<!>::uninit().assume_init();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ aborted execution: attempted to instantiate uninhabited type `!`
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@ -55,11 +51,10 @@ Future breakage diagnostic:
error: any use of this value will cause an error
--> $DIR/assert-type-intrinsics.rs:17:9
|
LL | / const _BAD2: () = unsafe {
LL | | intrinsics::assert_uninit_valid::<bool>();
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ aborted execution: attempted to leave type `bool` uninitialized, which is invalid
LL | | };
| |______-
LL | const _BAD2: () = unsafe {
| ---------------
LL | intrinsics::assert_uninit_valid::<bool>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ aborted execution: attempted to leave type `bool` uninitialized, which is invalid
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@ -69,11 +64,10 @@ Future breakage diagnostic:
error: any use of this value will cause an error
--> $DIR/assert-type-intrinsics.rs:20:9
|
LL | / const _BAD3: () = unsafe {
LL | | intrinsics::assert_zero_valid::<&'static i32>();
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ aborted execution: attempted to zero-initialize type `&i32`, which is invalid
LL | | };
| |______-
LL | const _BAD3: () = unsafe {
| ---------------
LL | intrinsics::assert_zero_valid::<&'static i32>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ aborted execution: attempted to zero-initialize type `&i32`, which is invalid
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!

View file

@ -2,9 +2,7 @@ warning: any use of this value will cause an error
--> $DIR/assoc_const_generic_impl.rs:11:34
|
LL | const I_AM_ZERO_SIZED: () = [()][std::mem::size_of::<Self>()];
| -----------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
| |
| index out of bounds: the length is 1 but the index is 4
| ------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ index out of bounds: the length is 1 but the index is 4
|
note: the lint level is defined here
--> $DIR/assoc_const_generic_impl.rs:3:9
@ -27,9 +25,7 @@ warning: any use of this value will cause an error
--> $DIR/assoc_const_generic_impl.rs:11:34
|
LL | const I_AM_ZERO_SIZED: () = [()][std::mem::size_of::<Self>()];
| -----------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
| |
| index out of bounds: the length is 1 but the index is 4
| ------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ index out of bounds: the length is 1 but the index is 4
|
note: the lint level is defined here
--> $DIR/assoc_const_generic_impl.rs:3:9

View file

@ -2,7 +2,7 @@ error[E0618]: expected function, found `usize`
--> $DIR/const-as-fn.rs:4:5
|
LL | const FOO: usize = 0;
| --------------------- `FOO` defined here
| ---------------- `FOO` defined here
...
LL | FOO();
| ^^^--

View file

@ -2,9 +2,7 @@ error: any use of this value will cause an error
--> $DIR/const-err-early.rs:3:19
|
LL | pub const A: i8 = -i8::MIN;
| ------------------^^^^^^^^-
| |
| attempt to negate `i8::MIN`, which would overflow
| --------------- ^^^^^^^^ attempt to negate `i8::MIN`, which would overflow
|
note: the lint level is defined here
--> $DIR/const-err-early.rs:1:9
@ -18,9 +16,7 @@ error: any use of this value will cause an error
--> $DIR/const-err-early.rs:5:19
|
LL | pub const B: u8 = 200u8 + 200u8;
| ------------------^^^^^^^^^^^^^-
| |
| attempt to compute `200_u8 + 200_u8`, which would overflow
| --------------- ^^^^^^^^^^^^^ attempt to compute `200_u8 + 200_u8`, which would overflow
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -29,9 +25,7 @@ error: any use of this value will cause an error
--> $DIR/const-err-early.rs:7:19
|
LL | pub const C: u8 = 200u8 * 4;
| ------------------^^^^^^^^^-
| |
| attempt to compute `200_u8 * 4_u8`, which would overflow
| --------------- ^^^^^^^^^ attempt to compute `200_u8 * 4_u8`, which would overflow
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -40,9 +34,7 @@ error: any use of this value will cause an error
--> $DIR/const-err-early.rs:9:19
|
LL | pub const D: u8 = 42u8 - (42u8 + 1);
| ------------------^^^^^^^^^^^^^^^^^-
| |
| attempt to compute `42_u8 - 43_u8`, which would overflow
| --------------- ^^^^^^^^^^^^^^^^^ attempt to compute `42_u8 - 43_u8`, which would overflow
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -51,9 +43,7 @@ error: any use of this value will cause an error
--> $DIR/const-err-early.rs:11:19
|
LL | pub const E: u8 = [5u8][1];
| ------------------^^^^^^^^-
| |
| index out of bounds: the length is 1 but the index is 1
| --------------- ^^^^^^^^ index out of bounds: the length is 1 but the index is 1
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -65,9 +55,7 @@ error: any use of this value will cause an error
--> $DIR/const-err-early.rs:3:19
|
LL | pub const A: i8 = -i8::MIN;
| ------------------^^^^^^^^-
| |
| attempt to negate `i8::MIN`, which would overflow
| --------------- ^^^^^^^^ attempt to negate `i8::MIN`, which would overflow
|
note: the lint level is defined here
--> $DIR/const-err-early.rs:1:9
@ -82,9 +70,7 @@ error: any use of this value will cause an error
--> $DIR/const-err-early.rs:5:19
|
LL | pub const B: u8 = 200u8 + 200u8;
| ------------------^^^^^^^^^^^^^-
| |
| attempt to compute `200_u8 + 200_u8`, which would overflow
| --------------- ^^^^^^^^^^^^^ attempt to compute `200_u8 + 200_u8`, which would overflow
|
note: the lint level is defined here
--> $DIR/const-err-early.rs:1:9
@ -99,9 +85,7 @@ error: any use of this value will cause an error
--> $DIR/const-err-early.rs:7:19
|
LL | pub const C: u8 = 200u8 * 4;
| ------------------^^^^^^^^^-
| |
| attempt to compute `200_u8 * 4_u8`, which would overflow
| --------------- ^^^^^^^^^ attempt to compute `200_u8 * 4_u8`, which would overflow
|
note: the lint level is defined here
--> $DIR/const-err-early.rs:1:9
@ -116,9 +100,7 @@ error: any use of this value will cause an error
--> $DIR/const-err-early.rs:9:19
|
LL | pub const D: u8 = 42u8 - (42u8 + 1);
| ------------------^^^^^^^^^^^^^^^^^-
| |
| attempt to compute `42_u8 - 43_u8`, which would overflow
| --------------- ^^^^^^^^^^^^^^^^^ attempt to compute `42_u8 - 43_u8`, which would overflow
|
note: the lint level is defined here
--> $DIR/const-err-early.rs:1:9
@ -133,9 +115,7 @@ error: any use of this value will cause an error
--> $DIR/const-err-early.rs:11:19
|
LL | pub const E: u8 = [5u8][1];
| ------------------^^^^^^^^-
| |
| index out of bounds: the length is 1 but the index is 1
| --------------- ^^^^^^^^ index out of bounds: the length is 1 but the index is 1
|
note: the lint level is defined here
--> $DIR/const-err-early.rs:1:9

View file

@ -2,9 +2,7 @@ error: any use of this value will cause an error
--> $DIR/const-err-multi.rs:3:19
|
LL | pub const A: i8 = -i8::MIN;
| ------------------^^^^^^^^-
| |
| attempt to negate `i8::MIN`, which would overflow
| --------------- ^^^^^^^^ attempt to negate `i8::MIN`, which would overflow
|
note: the lint level is defined here
--> $DIR/const-err-multi.rs:1:9
@ -18,9 +16,7 @@ error: any use of this value will cause an error
--> $DIR/const-err-multi.rs:6:19
|
LL | pub const B: i8 = A;
| ------------------^-
| |
| referenced constant has errors
| --------------- ^ referenced constant has errors
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -29,9 +25,7 @@ error: any use of this value will cause an error
--> $DIR/const-err-multi.rs:9:19
|
LL | pub const C: u8 = A as u8;
| ------------------^-------
| |
| referenced constant has errors
| --------------- ^ referenced constant has errors
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -40,9 +34,7 @@ error: any use of this value will cause an error
--> $DIR/const-err-multi.rs:12:24
|
LL | pub const D: i8 = 50 - A;
| -----------------------^-
| |
| referenced constant has errors
| --------------- ^ referenced constant has errors
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -54,9 +46,7 @@ error: any use of this value will cause an error
--> $DIR/const-err-multi.rs:3:19
|
LL | pub const A: i8 = -i8::MIN;
| ------------------^^^^^^^^-
| |
| attempt to negate `i8::MIN`, which would overflow
| --------------- ^^^^^^^^ attempt to negate `i8::MIN`, which would overflow
|
note: the lint level is defined here
--> $DIR/const-err-multi.rs:1:9
@ -71,9 +61,7 @@ error: any use of this value will cause an error
--> $DIR/const-err-multi.rs:6:19
|
LL | pub const B: i8 = A;
| ------------------^-
| |
| referenced constant has errors
| --------------- ^ referenced constant has errors
|
note: the lint level is defined here
--> $DIR/const-err-multi.rs:1:9
@ -88,9 +76,7 @@ error: any use of this value will cause an error
--> $DIR/const-err-multi.rs:9:19
|
LL | pub const C: u8 = A as u8;
| ------------------^-------
| |
| referenced constant has errors
| --------------- ^ referenced constant has errors
|
note: the lint level is defined here
--> $DIR/const-err-multi.rs:1:9
@ -105,9 +91,7 @@ error: any use of this value will cause an error
--> $DIR/const-err-multi.rs:12:24
|
LL | pub const D: i8 = 50 - A;
| -----------------------^-
| |
| referenced constant has errors
| --------------- ^ referenced constant has errors
|
note: the lint level is defined here
--> $DIR/const-err-multi.rs:1:9

View file

@ -2,9 +2,7 @@ warning: any use of this value will cause an error
--> $DIR/const-err.rs:11:17
|
LL | const FOO: u8 = [5u8][1];
| ----------------^^^^^^^^-
| |
| index out of bounds: the length is 1 but the index is 1
| ------------- ^^^^^^^^ index out of bounds: the length is 1 but the index is 1
|
note: the lint level is defined here
--> $DIR/const-err.rs:5:9
@ -34,9 +32,7 @@ warning: any use of this value will cause an error
--> $DIR/const-err.rs:11:17
|
LL | const FOO: u8 = [5u8][1];
| ----------------^^^^^^^^-
| |
| index out of bounds: the length is 1 but the index is 1
| ------------- ^^^^^^^^ index out of bounds: the length is 1 but the index is 1
|
note: the lint level is defined here
--> $DIR/const-err.rs:5:9

View file

@ -2,9 +2,7 @@ warning: any use of this value will cause an error
--> $DIR/conditional_array_execution.rs:7:19
|
LL | const FOO: u32 = [X - Y, Y - X][(X < Y) as usize];
| ------------------^^^^^---------------------------
| |
| attempt to compute `5_u32 - 6_u32`, which would overflow
| -------------- ^^^^^ attempt to compute `5_u32 - 6_u32`, which would overflow
|
note: the lint level is defined here
--> $DIR/conditional_array_execution.rs:3:9
@ -38,9 +36,7 @@ warning: any use of this value will cause an error
--> $DIR/conditional_array_execution.rs:7:19
|
LL | const FOO: u32 = [X - Y, Y - X][(X < Y) as usize];
| ------------------^^^^^---------------------------
| |
| attempt to compute `5_u32 - 6_u32`, which would overflow
| -------------- ^^^^^ attempt to compute `5_u32 - 6_u32`, which would overflow
|
note: the lint level is defined here
--> $DIR/conditional_array_execution.rs:3:9

View file

@ -17,9 +17,7 @@ warning: any use of this value will cause an error
--> $DIR/const-eval-overflow-2.rs:11:25
|
LL | const NEG_NEG_128: i8 = -NEG_128;
| ------------------------^^^^^^^^-
| |
| attempt to negate `i8::MIN`, which would overflow
| --------------------- ^^^^^^^^ attempt to negate `i8::MIN`, which would overflow
|
note: the lint level is defined here
--> $DIR/const-eval-overflow-2.rs:4:36

View file

@ -1,12 +1,11 @@
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2.rs:14:6
|
LL | / const VALS_I8: (i8,) =
LL | | (
LL | | i8::MIN - 1,
| | ^^^^^^^^^^^ attempt to compute `i8::MIN - 1_i8`, which would overflow
LL | | );
| |_______-
LL | const VALS_I8: (i8,) =
| --------------------
LL | (
LL | i8::MIN - 1,
| ^^^^^^^^^^^ attempt to compute `i8::MIN - 1_i8`, which would overflow
|
note: the lint level is defined here
--> $DIR/const-eval-overflow2.rs:8:9
@ -19,12 +18,11 @@ LL | #![deny(const_err)]
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2.rs:21:6
|
LL | / const VALS_I16: (i16,) =
LL | | (
LL | | i16::MIN - 1,
| | ^^^^^^^^^^^^ attempt to compute `i16::MIN - 1_i16`, which would overflow
LL | | );
| |_______-
LL | const VALS_I16: (i16,) =
| ----------------------
LL | (
LL | i16::MIN - 1,
| ^^^^^^^^^^^^ attempt to compute `i16::MIN - 1_i16`, which would overflow
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -32,12 +30,11 @@ LL | | );
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2.rs:28:6
|
LL | / const VALS_I32: (i32,) =
LL | | (
LL | | i32::MIN - 1,
| | ^^^^^^^^^^^^ attempt to compute `i32::MIN - 1_i32`, which would overflow
LL | | );
| |_______-
LL | const VALS_I32: (i32,) =
| ----------------------
LL | (
LL | i32::MIN - 1,
| ^^^^^^^^^^^^ attempt to compute `i32::MIN - 1_i32`, which would overflow
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -45,12 +42,11 @@ LL | | );
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2.rs:35:6
|
LL | / const VALS_I64: (i64,) =
LL | | (
LL | | i64::MIN - 1,
| | ^^^^^^^^^^^^ attempt to compute `i64::MIN - 1_i64`, which would overflow
LL | | );
| |_______-
LL | const VALS_I64: (i64,) =
| ----------------------
LL | (
LL | i64::MIN - 1,
| ^^^^^^^^^^^^ attempt to compute `i64::MIN - 1_i64`, which would overflow
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -58,12 +54,11 @@ LL | | );
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2.rs:42:6
|
LL | / const VALS_U8: (u8,) =
LL | | (
LL | | u8::MIN - 1,
| | ^^^^^^^^^^^ attempt to compute `0_u8 - 1_u8`, which would overflow
LL | | );
| |_______-
LL | const VALS_U8: (u8,) =
| --------------------
LL | (
LL | u8::MIN - 1,
| ^^^^^^^^^^^ attempt to compute `0_u8 - 1_u8`, which would overflow
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -71,11 +66,10 @@ LL | | );
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2.rs:48:6
|
LL | / const VALS_U16: (u16,) = (
LL | | u16::MIN - 1,
| | ^^^^^^^^^^^^ attempt to compute `0_u16 - 1_u16`, which would overflow
LL | | );
| |_______-
LL | const VALS_U16: (u16,) = (
| ----------------------
LL | u16::MIN - 1,
| ^^^^^^^^^^^^ attempt to compute `0_u16 - 1_u16`, which would overflow
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -83,11 +77,10 @@ LL | | );
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2.rs:54:6
|
LL | / const VALS_U32: (u32,) = (
LL | | u32::MIN - 1,
| | ^^^^^^^^^^^^ attempt to compute `0_u32 - 1_u32`, which would overflow
LL | | );
| |_______-
LL | const VALS_U32: (u32,) = (
| ----------------------
LL | u32::MIN - 1,
| ^^^^^^^^^^^^ attempt to compute `0_u32 - 1_u32`, which would overflow
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -95,12 +88,11 @@ LL | | );
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2.rs:61:6
|
LL | / const VALS_U64: (u64,) =
LL | | (
LL | | u64::MIN - 1,
| | ^^^^^^^^^^^^ attempt to compute `0_u64 - 1_u64`, which would overflow
LL | | );
| |_______-
LL | const VALS_U64: (u64,) =
| ----------------------
LL | (
LL | u64::MIN - 1,
| ^^^^^^^^^^^^ attempt to compute `0_u64 - 1_u64`, which would overflow
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -111,12 +103,11 @@ Future incompatibility report: Future breakage diagnostic:
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2.rs:14:6
|
LL | / const VALS_I8: (i8,) =
LL | | (
LL | | i8::MIN - 1,
| | ^^^^^^^^^^^ attempt to compute `i8::MIN - 1_i8`, which would overflow
LL | | );
| |_______-
LL | const VALS_I8: (i8,) =
| --------------------
LL | (
LL | i8::MIN - 1,
| ^^^^^^^^^^^ attempt to compute `i8::MIN - 1_i8`, which would overflow
|
note: the lint level is defined here
--> $DIR/const-eval-overflow2.rs:8:9
@ -130,12 +121,11 @@ Future breakage diagnostic:
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2.rs:21:6
|
LL | / const VALS_I16: (i16,) =
LL | | (
LL | | i16::MIN - 1,
| | ^^^^^^^^^^^^ attempt to compute `i16::MIN - 1_i16`, which would overflow
LL | | );
| |_______-
LL | const VALS_I16: (i16,) =
| ----------------------
LL | (
LL | i16::MIN - 1,
| ^^^^^^^^^^^^ attempt to compute `i16::MIN - 1_i16`, which would overflow
|
note: the lint level is defined here
--> $DIR/const-eval-overflow2.rs:8:9
@ -149,12 +139,11 @@ Future breakage diagnostic:
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2.rs:28:6
|
LL | / const VALS_I32: (i32,) =
LL | | (
LL | | i32::MIN - 1,
| | ^^^^^^^^^^^^ attempt to compute `i32::MIN - 1_i32`, which would overflow
LL | | );
| |_______-
LL | const VALS_I32: (i32,) =
| ----------------------
LL | (
LL | i32::MIN - 1,
| ^^^^^^^^^^^^ attempt to compute `i32::MIN - 1_i32`, which would overflow
|
note: the lint level is defined here
--> $DIR/const-eval-overflow2.rs:8:9
@ -168,12 +157,11 @@ Future breakage diagnostic:
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2.rs:35:6
|
LL | / const VALS_I64: (i64,) =
LL | | (
LL | | i64::MIN - 1,
| | ^^^^^^^^^^^^ attempt to compute `i64::MIN - 1_i64`, which would overflow
LL | | );
| |_______-
LL | const VALS_I64: (i64,) =
| ----------------------
LL | (
LL | i64::MIN - 1,
| ^^^^^^^^^^^^ attempt to compute `i64::MIN - 1_i64`, which would overflow
|
note: the lint level is defined here
--> $DIR/const-eval-overflow2.rs:8:9
@ -187,12 +175,11 @@ Future breakage diagnostic:
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2.rs:42:6
|
LL | / const VALS_U8: (u8,) =
LL | | (
LL | | u8::MIN - 1,
| | ^^^^^^^^^^^ attempt to compute `0_u8 - 1_u8`, which would overflow
LL | | );
| |_______-
LL | const VALS_U8: (u8,) =
| --------------------
LL | (
LL | u8::MIN - 1,
| ^^^^^^^^^^^ attempt to compute `0_u8 - 1_u8`, which would overflow
|
note: the lint level is defined here
--> $DIR/const-eval-overflow2.rs:8:9
@ -206,11 +193,10 @@ Future breakage diagnostic:
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2.rs:48:6
|
LL | / const VALS_U16: (u16,) = (
LL | | u16::MIN - 1,
| | ^^^^^^^^^^^^ attempt to compute `0_u16 - 1_u16`, which would overflow
LL | | );
| |_______-
LL | const VALS_U16: (u16,) = (
| ----------------------
LL | u16::MIN - 1,
| ^^^^^^^^^^^^ attempt to compute `0_u16 - 1_u16`, which would overflow
|
note: the lint level is defined here
--> $DIR/const-eval-overflow2.rs:8:9
@ -224,11 +210,10 @@ Future breakage diagnostic:
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2.rs:54:6
|
LL | / const VALS_U32: (u32,) = (
LL | | u32::MIN - 1,
| | ^^^^^^^^^^^^ attempt to compute `0_u32 - 1_u32`, which would overflow
LL | | );
| |_______-
LL | const VALS_U32: (u32,) = (
| ----------------------
LL | u32::MIN - 1,
| ^^^^^^^^^^^^ attempt to compute `0_u32 - 1_u32`, which would overflow
|
note: the lint level is defined here
--> $DIR/const-eval-overflow2.rs:8:9
@ -242,12 +227,11 @@ Future breakage diagnostic:
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2.rs:61:6
|
LL | / const VALS_U64: (u64,) =
LL | | (
LL | | u64::MIN - 1,
| | ^^^^^^^^^^^^ attempt to compute `0_u64 - 1_u64`, which would overflow
LL | | );
| |_______-
LL | const VALS_U64: (u64,) =
| ----------------------
LL | (
LL | u64::MIN - 1,
| ^^^^^^^^^^^^ attempt to compute `0_u64 - 1_u64`, which would overflow
|
note: the lint level is defined here
--> $DIR/const-eval-overflow2.rs:8:9

View file

@ -1,12 +1,11 @@
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2b.rs:14:6
|
LL | / const VALS_I8: (i8,) =
LL | | (
LL | | i8::MAX + 1,
| | ^^^^^^^^^^^ attempt to compute `i8::MAX + 1_i8`, which would overflow
LL | | );
| |_______-
LL | const VALS_I8: (i8,) =
| --------------------
LL | (
LL | i8::MAX + 1,
| ^^^^^^^^^^^ attempt to compute `i8::MAX + 1_i8`, which would overflow
|
note: the lint level is defined here
--> $DIR/const-eval-overflow2b.rs:8:9
@ -19,12 +18,11 @@ LL | #![deny(const_err)]
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2b.rs:21:6
|
LL | / const VALS_I16: (i16,) =
LL | | (
LL | | i16::MAX + 1,
| | ^^^^^^^^^^^^ attempt to compute `i16::MAX + 1_i16`, which would overflow
LL | | );
| |_______-
LL | const VALS_I16: (i16,) =
| ----------------------
LL | (
LL | i16::MAX + 1,
| ^^^^^^^^^^^^ attempt to compute `i16::MAX + 1_i16`, which would overflow
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -32,12 +30,11 @@ LL | | );
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2b.rs:28:6
|
LL | / const VALS_I32: (i32,) =
LL | | (
LL | | i32::MAX + 1,
| | ^^^^^^^^^^^^ attempt to compute `i32::MAX + 1_i32`, which would overflow
LL | | );
| |_______-
LL | const VALS_I32: (i32,) =
| ----------------------
LL | (
LL | i32::MAX + 1,
| ^^^^^^^^^^^^ attempt to compute `i32::MAX + 1_i32`, which would overflow
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -45,12 +42,11 @@ LL | | );
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2b.rs:35:6
|
LL | / const VALS_I64: (i64,) =
LL | | (
LL | | i64::MAX + 1,
| | ^^^^^^^^^^^^ attempt to compute `i64::MAX + 1_i64`, which would overflow
LL | | );
| |_______-
LL | const VALS_I64: (i64,) =
| ----------------------
LL | (
LL | i64::MAX + 1,
| ^^^^^^^^^^^^ attempt to compute `i64::MAX + 1_i64`, which would overflow
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -58,12 +54,11 @@ LL | | );
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2b.rs:42:6
|
LL | / const VALS_U8: (u8,) =
LL | | (
LL | | u8::MAX + 1,
| | ^^^^^^^^^^^ attempt to compute `u8::MAX + 1_u8`, which would overflow
LL | | );
| |_______-
LL | const VALS_U8: (u8,) =
| --------------------
LL | (
LL | u8::MAX + 1,
| ^^^^^^^^^^^ attempt to compute `u8::MAX + 1_u8`, which would overflow
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -71,11 +66,10 @@ LL | | );
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2b.rs:48:6
|
LL | / const VALS_U16: (u16,) = (
LL | | u16::MAX + 1,
| | ^^^^^^^^^^^^ attempt to compute `u16::MAX + 1_u16`, which would overflow
LL | | );
| |_______-
LL | const VALS_U16: (u16,) = (
| ----------------------
LL | u16::MAX + 1,
| ^^^^^^^^^^^^ attempt to compute `u16::MAX + 1_u16`, which would overflow
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -83,11 +77,10 @@ LL | | );
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2b.rs:54:6
|
LL | / const VALS_U32: (u32,) = (
LL | | u32::MAX + 1,
| | ^^^^^^^^^^^^ attempt to compute `u32::MAX + 1_u32`, which would overflow
LL | | );
| |_______-
LL | const VALS_U32: (u32,) = (
| ----------------------
LL | u32::MAX + 1,
| ^^^^^^^^^^^^ attempt to compute `u32::MAX + 1_u32`, which would overflow
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -95,12 +88,11 @@ LL | | );
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2b.rs:61:6
|
LL | / const VALS_U64: (u64,) =
LL | | (
LL | | u64::MAX + 1,
| | ^^^^^^^^^^^^ attempt to compute `u64::MAX + 1_u64`, which would overflow
LL | | );
| |_______-
LL | const VALS_U64: (u64,) =
| ----------------------
LL | (
LL | u64::MAX + 1,
| ^^^^^^^^^^^^ attempt to compute `u64::MAX + 1_u64`, which would overflow
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -111,12 +103,11 @@ Future incompatibility report: Future breakage diagnostic:
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2b.rs:14:6
|
LL | / const VALS_I8: (i8,) =
LL | | (
LL | | i8::MAX + 1,
| | ^^^^^^^^^^^ attempt to compute `i8::MAX + 1_i8`, which would overflow
LL | | );
| |_______-
LL | const VALS_I8: (i8,) =
| --------------------
LL | (
LL | i8::MAX + 1,
| ^^^^^^^^^^^ attempt to compute `i8::MAX + 1_i8`, which would overflow
|
note: the lint level is defined here
--> $DIR/const-eval-overflow2b.rs:8:9
@ -130,12 +121,11 @@ Future breakage diagnostic:
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2b.rs:21:6
|
LL | / const VALS_I16: (i16,) =
LL | | (
LL | | i16::MAX + 1,
| | ^^^^^^^^^^^^ attempt to compute `i16::MAX + 1_i16`, which would overflow
LL | | );
| |_______-
LL | const VALS_I16: (i16,) =
| ----------------------
LL | (
LL | i16::MAX + 1,
| ^^^^^^^^^^^^ attempt to compute `i16::MAX + 1_i16`, which would overflow
|
note: the lint level is defined here
--> $DIR/const-eval-overflow2b.rs:8:9
@ -149,12 +139,11 @@ Future breakage diagnostic:
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2b.rs:28:6
|
LL | / const VALS_I32: (i32,) =
LL | | (
LL | | i32::MAX + 1,
| | ^^^^^^^^^^^^ attempt to compute `i32::MAX + 1_i32`, which would overflow
LL | | );
| |_______-
LL | const VALS_I32: (i32,) =
| ----------------------
LL | (
LL | i32::MAX + 1,
| ^^^^^^^^^^^^ attempt to compute `i32::MAX + 1_i32`, which would overflow
|
note: the lint level is defined here
--> $DIR/const-eval-overflow2b.rs:8:9
@ -168,12 +157,11 @@ Future breakage diagnostic:
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2b.rs:35:6
|
LL | / const VALS_I64: (i64,) =
LL | | (
LL | | i64::MAX + 1,
| | ^^^^^^^^^^^^ attempt to compute `i64::MAX + 1_i64`, which would overflow
LL | | );
| |_______-
LL | const VALS_I64: (i64,) =
| ----------------------
LL | (
LL | i64::MAX + 1,
| ^^^^^^^^^^^^ attempt to compute `i64::MAX + 1_i64`, which would overflow
|
note: the lint level is defined here
--> $DIR/const-eval-overflow2b.rs:8:9
@ -187,12 +175,11 @@ Future breakage diagnostic:
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2b.rs:42:6
|
LL | / const VALS_U8: (u8,) =
LL | | (
LL | | u8::MAX + 1,
| | ^^^^^^^^^^^ attempt to compute `u8::MAX + 1_u8`, which would overflow
LL | | );
| |_______-
LL | const VALS_U8: (u8,) =
| --------------------
LL | (
LL | u8::MAX + 1,
| ^^^^^^^^^^^ attempt to compute `u8::MAX + 1_u8`, which would overflow
|
note: the lint level is defined here
--> $DIR/const-eval-overflow2b.rs:8:9
@ -206,11 +193,10 @@ Future breakage diagnostic:
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2b.rs:48:6
|
LL | / const VALS_U16: (u16,) = (
LL | | u16::MAX + 1,
| | ^^^^^^^^^^^^ attempt to compute `u16::MAX + 1_u16`, which would overflow
LL | | );
| |_______-
LL | const VALS_U16: (u16,) = (
| ----------------------
LL | u16::MAX + 1,
| ^^^^^^^^^^^^ attempt to compute `u16::MAX + 1_u16`, which would overflow
|
note: the lint level is defined here
--> $DIR/const-eval-overflow2b.rs:8:9
@ -224,11 +210,10 @@ Future breakage diagnostic:
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2b.rs:54:6
|
LL | / const VALS_U32: (u32,) = (
LL | | u32::MAX + 1,
| | ^^^^^^^^^^^^ attempt to compute `u32::MAX + 1_u32`, which would overflow
LL | | );
| |_______-
LL | const VALS_U32: (u32,) = (
| ----------------------
LL | u32::MAX + 1,
| ^^^^^^^^^^^^ attempt to compute `u32::MAX + 1_u32`, which would overflow
|
note: the lint level is defined here
--> $DIR/const-eval-overflow2b.rs:8:9
@ -242,12 +227,11 @@ Future breakage diagnostic:
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2b.rs:61:6
|
LL | / const VALS_U64: (u64,) =
LL | | (
LL | | u64::MAX + 1,
| | ^^^^^^^^^^^^ attempt to compute `u64::MAX + 1_u64`, which would overflow
LL | | );
| |_______-
LL | const VALS_U64: (u64,) =
| ----------------------
LL | (
LL | u64::MAX + 1,
| ^^^^^^^^^^^^ attempt to compute `u64::MAX + 1_u64`, which would overflow
|
note: the lint level is defined here
--> $DIR/const-eval-overflow2b.rs:8:9

View file

@ -1,12 +1,11 @@
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2c.rs:14:6
|
LL | / const VALS_I8: (i8,) =
LL | | (
LL | | i8::MIN * 2,
| | ^^^^^^^^^^^ attempt to compute `i8::MIN * 2_i8`, which would overflow
LL | | );
| |_______-
LL | const VALS_I8: (i8,) =
| --------------------
LL | (
LL | i8::MIN * 2,
| ^^^^^^^^^^^ attempt to compute `i8::MIN * 2_i8`, which would overflow
|
note: the lint level is defined here
--> $DIR/const-eval-overflow2c.rs:8:9
@ -19,12 +18,11 @@ LL | #![deny(const_err)]
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2c.rs:21:6
|
LL | / const VALS_I16: (i16,) =
LL | | (
LL | | i16::MIN * 2,
| | ^^^^^^^^^^^^ attempt to compute `i16::MIN * 2_i16`, which would overflow
LL | | );
| |_______-
LL | const VALS_I16: (i16,) =
| ----------------------
LL | (
LL | i16::MIN * 2,
| ^^^^^^^^^^^^ attempt to compute `i16::MIN * 2_i16`, which would overflow
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -32,12 +30,11 @@ LL | | );
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2c.rs:28:6
|
LL | / const VALS_I32: (i32,) =
LL | | (
LL | | i32::MIN * 2,
| | ^^^^^^^^^^^^ attempt to compute `i32::MIN * 2_i32`, which would overflow
LL | | );
| |_______-
LL | const VALS_I32: (i32,) =
| ----------------------
LL | (
LL | i32::MIN * 2,
| ^^^^^^^^^^^^ attempt to compute `i32::MIN * 2_i32`, which would overflow
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -45,12 +42,11 @@ LL | | );
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2c.rs:35:6
|
LL | / const VALS_I64: (i64,) =
LL | | (
LL | | i64::MIN * 2,
| | ^^^^^^^^^^^^ attempt to compute `i64::MIN * 2_i64`, which would overflow
LL | | );
| |_______-
LL | const VALS_I64: (i64,) =
| ----------------------
LL | (
LL | i64::MIN * 2,
| ^^^^^^^^^^^^ attempt to compute `i64::MIN * 2_i64`, which would overflow
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -58,12 +54,11 @@ LL | | );
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2c.rs:42:6
|
LL | / const VALS_U8: (u8,) =
LL | | (
LL | | u8::MAX * 2,
| | ^^^^^^^^^^^ attempt to compute `u8::MAX * 2_u8`, which would overflow
LL | | );
| |_______-
LL | const VALS_U8: (u8,) =
| --------------------
LL | (
LL | u8::MAX * 2,
| ^^^^^^^^^^^ attempt to compute `u8::MAX * 2_u8`, which would overflow
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -71,11 +66,10 @@ LL | | );
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2c.rs:48:6
|
LL | / const VALS_U16: (u16,) = (
LL | | u16::MAX * 2,
| | ^^^^^^^^^^^^ attempt to compute `u16::MAX * 2_u16`, which would overflow
LL | | );
| |_______-
LL | const VALS_U16: (u16,) = (
| ----------------------
LL | u16::MAX * 2,
| ^^^^^^^^^^^^ attempt to compute `u16::MAX * 2_u16`, which would overflow
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -83,11 +77,10 @@ LL | | );
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2c.rs:54:6
|
LL | / const VALS_U32: (u32,) = (
LL | | u32::MAX * 2,
| | ^^^^^^^^^^^^ attempt to compute `u32::MAX * 2_u32`, which would overflow
LL | | );
| |_______-
LL | const VALS_U32: (u32,) = (
| ----------------------
LL | u32::MAX * 2,
| ^^^^^^^^^^^^ attempt to compute `u32::MAX * 2_u32`, which would overflow
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -95,12 +88,11 @@ LL | | );
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2c.rs:61:6
|
LL | / const VALS_U64: (u64,) =
LL | | (
LL | | u64::MAX * 2,
| | ^^^^^^^^^^^^ attempt to compute `u64::MAX * 2_u64`, which would overflow
LL | | );
| |_______-
LL | const VALS_U64: (u64,) =
| ----------------------
LL | (
LL | u64::MAX * 2,
| ^^^^^^^^^^^^ attempt to compute `u64::MAX * 2_u64`, which would overflow
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -111,12 +103,11 @@ Future incompatibility report: Future breakage diagnostic:
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2c.rs:14:6
|
LL | / const VALS_I8: (i8,) =
LL | | (
LL | | i8::MIN * 2,
| | ^^^^^^^^^^^ attempt to compute `i8::MIN * 2_i8`, which would overflow
LL | | );
| |_______-
LL | const VALS_I8: (i8,) =
| --------------------
LL | (
LL | i8::MIN * 2,
| ^^^^^^^^^^^ attempt to compute `i8::MIN * 2_i8`, which would overflow
|
note: the lint level is defined here
--> $DIR/const-eval-overflow2c.rs:8:9
@ -130,12 +121,11 @@ Future breakage diagnostic:
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2c.rs:21:6
|
LL | / const VALS_I16: (i16,) =
LL | | (
LL | | i16::MIN * 2,
| | ^^^^^^^^^^^^ attempt to compute `i16::MIN * 2_i16`, which would overflow
LL | | );
| |_______-
LL | const VALS_I16: (i16,) =
| ----------------------
LL | (
LL | i16::MIN * 2,
| ^^^^^^^^^^^^ attempt to compute `i16::MIN * 2_i16`, which would overflow
|
note: the lint level is defined here
--> $DIR/const-eval-overflow2c.rs:8:9
@ -149,12 +139,11 @@ Future breakage diagnostic:
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2c.rs:28:6
|
LL | / const VALS_I32: (i32,) =
LL | | (
LL | | i32::MIN * 2,
| | ^^^^^^^^^^^^ attempt to compute `i32::MIN * 2_i32`, which would overflow
LL | | );
| |_______-
LL | const VALS_I32: (i32,) =
| ----------------------
LL | (
LL | i32::MIN * 2,
| ^^^^^^^^^^^^ attempt to compute `i32::MIN * 2_i32`, which would overflow
|
note: the lint level is defined here
--> $DIR/const-eval-overflow2c.rs:8:9
@ -168,12 +157,11 @@ Future breakage diagnostic:
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2c.rs:35:6
|
LL | / const VALS_I64: (i64,) =
LL | | (
LL | | i64::MIN * 2,
| | ^^^^^^^^^^^^ attempt to compute `i64::MIN * 2_i64`, which would overflow
LL | | );
| |_______-
LL | const VALS_I64: (i64,) =
| ----------------------
LL | (
LL | i64::MIN * 2,
| ^^^^^^^^^^^^ attempt to compute `i64::MIN * 2_i64`, which would overflow
|
note: the lint level is defined here
--> $DIR/const-eval-overflow2c.rs:8:9
@ -187,12 +175,11 @@ Future breakage diagnostic:
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2c.rs:42:6
|
LL | / const VALS_U8: (u8,) =
LL | | (
LL | | u8::MAX * 2,
| | ^^^^^^^^^^^ attempt to compute `u8::MAX * 2_u8`, which would overflow
LL | | );
| |_______-
LL | const VALS_U8: (u8,) =
| --------------------
LL | (
LL | u8::MAX * 2,
| ^^^^^^^^^^^ attempt to compute `u8::MAX * 2_u8`, which would overflow
|
note: the lint level is defined here
--> $DIR/const-eval-overflow2c.rs:8:9
@ -206,11 +193,10 @@ Future breakage diagnostic:
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2c.rs:48:6
|
LL | / const VALS_U16: (u16,) = (
LL | | u16::MAX * 2,
| | ^^^^^^^^^^^^ attempt to compute `u16::MAX * 2_u16`, which would overflow
LL | | );
| |_______-
LL | const VALS_U16: (u16,) = (
| ----------------------
LL | u16::MAX * 2,
| ^^^^^^^^^^^^ attempt to compute `u16::MAX * 2_u16`, which would overflow
|
note: the lint level is defined here
--> $DIR/const-eval-overflow2c.rs:8:9
@ -224,11 +210,10 @@ Future breakage diagnostic:
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2c.rs:54:6
|
LL | / const VALS_U32: (u32,) = (
LL | | u32::MAX * 2,
| | ^^^^^^^^^^^^ attempt to compute `u32::MAX * 2_u32`, which would overflow
LL | | );
| |_______-
LL | const VALS_U32: (u32,) = (
| ----------------------
LL | u32::MAX * 2,
| ^^^^^^^^^^^^ attempt to compute `u32::MAX * 2_u32`, which would overflow
|
note: the lint level is defined here
--> $DIR/const-eval-overflow2c.rs:8:9
@ -242,12 +227,11 @@ Future breakage diagnostic:
error: any use of this value will cause an error
--> $DIR/const-eval-overflow2c.rs:61:6
|
LL | / const VALS_U64: (u64,) =
LL | | (
LL | | u64::MAX * 2,
| | ^^^^^^^^^^^^ attempt to compute `u64::MAX * 2_u64`, which would overflow
LL | | );
| |_______-
LL | const VALS_U64: (u64,) =
| ----------------------
LL | (
LL | u64::MAX * 2,
| ^^^^^^^^^^^^ attempt to compute `u64::MAX * 2_u64`, which would overflow
|
note: the lint level is defined here
--> $DIR/const-eval-overflow2c.rs:8:9

View file

@ -2,9 +2,7 @@ warning: any use of this value will cause an error
--> $DIR/const-eval-query-stack.rs:19:16
|
LL | const X: i32 = 1 / 0;
| ---------------^^^^^-
| |
| attempt to divide `1_i32` by zero
| ------------ ^^^^^ attempt to divide `1_i32` by zero
|
note: the lint level is defined here
--> $DIR/const-eval-query-stack.rs:18:8
@ -40,9 +38,7 @@ warning: any use of this value will cause an error
--> $DIR/const-eval-query-stack.rs:19:16
|
LL | const X: i32 = 1 / 0;
| ---------------^^^^^-
| |
| attempt to divide `1_i32` by zero
| ------------ ^^^^^ attempt to divide `1_i32` by zero
|
note: the lint level is defined here
--> $DIR/const-eval-query-stack.rs:18:8

View file

@ -2,9 +2,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:26:49
|
LL | const I32_REF_USIZE_UNION: usize = unsafe { Nonsense { int_32_ref: &3 }.u };
| --------------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| -------------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@ -14,9 +12,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:30:43
|
LL | const I32_REF_U8_UNION: u8 = unsafe { Nonsense { int_32_ref: &3 }.uint_8 };
| --------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| -------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -25,9 +21,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:34:45
|
LL | const I32_REF_U16_UNION: u16 = unsafe { Nonsense { int_32_ref: &3 }.uint_16 };
| ----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| ---------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -36,9 +30,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:38:45
|
LL | const I32_REF_U32_UNION: u32 = unsafe { Nonsense { int_32_ref: &3 }.uint_32 };
| ----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| ---------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -47,9 +39,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:42:45
|
LL | const I32_REF_U64_UNION: u64 = unsafe { Nonsense { int_32_ref: &3 }.uint_64 };
| ----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| ---------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -58,7 +48,7 @@ error[E0080]: it is undefined behavior to use this value
--> $DIR/const-pointer-values-in-various-types.rs:46:5
|
LL | const I32_REF_U128_UNION: u128 = unsafe { Nonsense { int_32_ref: &3 }.uint_128 };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered uninitialized bytes, but expected initialized bytes
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered uninitialized bytes, but expected initialized bytes
|
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
= note: the raw bytes of the constant (size: 16, align: 8) {
@ -69,9 +59,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:49:43
|
LL | const I32_REF_I8_UNION: i8 = unsafe { Nonsense { int_32_ref: &3 }.int_8 };
| --------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| -------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -80,9 +68,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:53:45
|
LL | const I32_REF_I16_UNION: i16 = unsafe { Nonsense { int_32_ref: &3 }.int_16 };
| ----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| ---------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -91,9 +77,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:57:45
|
LL | const I32_REF_I32_UNION: i32 = unsafe { Nonsense { int_32_ref: &3 }.int_32 };
| ----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| ---------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -102,9 +86,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:61:45
|
LL | const I32_REF_I64_UNION: i64 = unsafe { Nonsense { int_32_ref: &3 }.int_64 };
| ----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| ---------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -113,7 +95,7 @@ error[E0080]: it is undefined behavior to use this value
--> $DIR/const-pointer-values-in-various-types.rs:65:5
|
LL | const I32_REF_I128_UNION: i128 = unsafe { Nonsense { int_32_ref: &3 }.int_128 };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered uninitialized bytes, but expected initialized bytes
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered uninitialized bytes, but expected initialized bytes
|
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
= note: the raw bytes of the constant (size: 16, align: 8) {
@ -124,9 +106,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:68:45
|
LL | const I32_REF_F32_UNION: f32 = unsafe { Nonsense { int_32_ref: &3 }.float_32 };
| ----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| ---------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -135,9 +115,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:72:45
|
LL | const I32_REF_F64_UNION: f64 = unsafe { Nonsense { int_32_ref: &3 }.float_64 };
| ----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| ---------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -146,9 +124,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:76:47
|
LL | const I32_REF_BOOL_UNION: bool = unsafe { Nonsense { int_32_ref: &3 }.truthy_falsey };
| ------------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| ------------------------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -157,9 +133,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:80:47
|
LL | const I32_REF_CHAR_UNION: char = unsafe { Nonsense { int_32_ref: &3 }.character };
| ------------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| ------------------------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -168,9 +142,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:84:39
|
LL | const STR_U8_UNION: u8 = unsafe { Nonsense { stringy: "3" }.uint_8 };
| ----------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| ---------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -179,9 +151,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:88:41
|
LL | const STR_U16_UNION: u16 = unsafe { Nonsense { stringy: "3" }.uint_16 };
| ------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| ------------------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -190,9 +160,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:92:41
|
LL | const STR_U32_UNION: u32 = unsafe { Nonsense { stringy: "3" }.uint_32 };
| ------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| ------------------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -201,9 +169,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:96:41
|
LL | const STR_U64_UNION: u64 = unsafe { Nonsense { stringy: "3" }.uint_64 };
| ------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| ------------------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -212,9 +178,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:100:43
|
LL | const STR_U128_UNION: u128 = unsafe { Nonsense { stringy: "3" }.uint_128 };
| --------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| -------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -223,9 +187,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:104:39
|
LL | const STR_I8_UNION: i8 = unsafe { Nonsense { stringy: "3" }.int_8 };
| ----------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| ---------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -234,9 +196,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:108:41
|
LL | const STR_I16_UNION: i16 = unsafe { Nonsense { stringy: "3" }.int_16 };
| ------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| ------------------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -245,9 +205,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:112:41
|
LL | const STR_I32_UNION: i32 = unsafe { Nonsense { stringy: "3" }.int_32 };
| ------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| ------------------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -256,9 +214,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:116:41
|
LL | const STR_I64_UNION: i64 = unsafe { Nonsense { stringy: "3" }.int_64 };
| ------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| ------------------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -267,9 +223,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:120:43
|
LL | const STR_I128_UNION: i128 = unsafe { Nonsense { stringy: "3" }.int_128 };
| --------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| -------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -278,9 +232,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:124:41
|
LL | const STR_F32_UNION: f32 = unsafe { Nonsense { stringy: "3" }.float_32 };
| ------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| ------------------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -289,9 +241,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:128:41
|
LL | const STR_F64_UNION: f64 = unsafe { Nonsense { stringy: "3" }.float_64 };
| ------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| ------------------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -300,9 +250,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:132:43
|
LL | const STR_BOOL_UNION: bool = unsafe { Nonsense { stringy: "3" }.truthy_falsey };
| --------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| -------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -311,9 +259,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:136:43
|
LL | const STR_CHAR_UNION: char = unsafe { Nonsense { stringy: "3" }.character };
| --------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| -------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -326,9 +272,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:26:49
|
LL | const I32_REF_USIZE_UNION: usize = unsafe { Nonsense { int_32_ref: &3 }.u };
| --------------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| -------------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@ -339,9 +283,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:30:43
|
LL | const I32_REF_U8_UNION: u8 = unsafe { Nonsense { int_32_ref: &3 }.uint_8 };
| --------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| -------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@ -352,9 +294,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:34:45
|
LL | const I32_REF_U16_UNION: u16 = unsafe { Nonsense { int_32_ref: &3 }.uint_16 };
| ----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| ---------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@ -365,9 +305,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:38:45
|
LL | const I32_REF_U32_UNION: u32 = unsafe { Nonsense { int_32_ref: &3 }.uint_32 };
| ----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| ---------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@ -378,9 +316,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:42:45
|
LL | const I32_REF_U64_UNION: u64 = unsafe { Nonsense { int_32_ref: &3 }.uint_64 };
| ----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| ---------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@ -391,9 +327,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:49:43
|
LL | const I32_REF_I8_UNION: i8 = unsafe { Nonsense { int_32_ref: &3 }.int_8 };
| --------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| -------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@ -404,9 +338,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:53:45
|
LL | const I32_REF_I16_UNION: i16 = unsafe { Nonsense { int_32_ref: &3 }.int_16 };
| ----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| ---------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@ -417,9 +349,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:57:45
|
LL | const I32_REF_I32_UNION: i32 = unsafe { Nonsense { int_32_ref: &3 }.int_32 };
| ----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| ---------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@ -430,9 +360,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:61:45
|
LL | const I32_REF_I64_UNION: i64 = unsafe { Nonsense { int_32_ref: &3 }.int_64 };
| ----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| ---------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@ -443,9 +371,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:68:45
|
LL | const I32_REF_F32_UNION: f32 = unsafe { Nonsense { int_32_ref: &3 }.float_32 };
| ----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| ---------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@ -456,9 +382,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:72:45
|
LL | const I32_REF_F64_UNION: f64 = unsafe { Nonsense { int_32_ref: &3 }.float_64 };
| ----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| ---------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@ -469,9 +393,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:76:47
|
LL | const I32_REF_BOOL_UNION: bool = unsafe { Nonsense { int_32_ref: &3 }.truthy_falsey };
| ------------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| ------------------------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@ -482,9 +404,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:80:47
|
LL | const I32_REF_CHAR_UNION: char = unsafe { Nonsense { int_32_ref: &3 }.character };
| ------------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| ------------------------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@ -495,9 +415,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:84:39
|
LL | const STR_U8_UNION: u8 = unsafe { Nonsense { stringy: "3" }.uint_8 };
| ----------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| ---------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@ -508,9 +426,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:88:41
|
LL | const STR_U16_UNION: u16 = unsafe { Nonsense { stringy: "3" }.uint_16 };
| ------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| ------------------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@ -521,9 +437,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:92:41
|
LL | const STR_U32_UNION: u32 = unsafe { Nonsense { stringy: "3" }.uint_32 };
| ------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| ------------------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@ -534,9 +448,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:96:41
|
LL | const STR_U64_UNION: u64 = unsafe { Nonsense { stringy: "3" }.uint_64 };
| ------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| ------------------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@ -547,9 +459,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:100:43
|
LL | const STR_U128_UNION: u128 = unsafe { Nonsense { stringy: "3" }.uint_128 };
| --------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| -------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@ -560,9 +470,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:104:39
|
LL | const STR_I8_UNION: i8 = unsafe { Nonsense { stringy: "3" }.int_8 };
| ----------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| ---------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@ -573,9 +481,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:108:41
|
LL | const STR_I16_UNION: i16 = unsafe { Nonsense { stringy: "3" }.int_16 };
| ------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| ------------------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@ -586,9 +492,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:112:41
|
LL | const STR_I32_UNION: i32 = unsafe { Nonsense { stringy: "3" }.int_32 };
| ------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| ------------------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@ -599,9 +503,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:116:41
|
LL | const STR_I64_UNION: i64 = unsafe { Nonsense { stringy: "3" }.int_64 };
| ------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| ------------------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@ -612,9 +514,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:120:43
|
LL | const STR_I128_UNION: i128 = unsafe { Nonsense { stringy: "3" }.int_128 };
| --------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| -------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@ -625,9 +525,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:124:41
|
LL | const STR_F32_UNION: f32 = unsafe { Nonsense { stringy: "3" }.float_32 };
| ------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| ------------------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@ -638,9 +536,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:128:41
|
LL | const STR_F64_UNION: f64 = unsafe { Nonsense { stringy: "3" }.float_64 };
| ------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| ------------------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@ -651,9 +547,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:132:43
|
LL | const STR_BOOL_UNION: bool = unsafe { Nonsense { stringy: "3" }.truthy_falsey };
| --------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| -------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@ -664,9 +558,7 @@ error: any use of this value will cause an error
--> $DIR/const-pointer-values-in-various-types.rs:136:43
|
LL | const STR_CHAR_UNION: char = unsafe { Nonsense { stringy: "3" }.character };
| --------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| -------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!

View file

@ -33,7 +33,7 @@ LL | x(y)
| inside `Y` at $DIR/const_fn_ptr_fail2.rs:15:18
...
LL | const Y: usize = bar(X, 2); // FIXME: should fail to typeck someday
| ---------------------------
| --------------
|
note: the lint level is defined here
--> $DIR/const_fn_ptr_fail2.rs:4:10
@ -55,7 +55,7 @@ LL | x(y)
| inside `Z` at $DIR/const_fn_ptr_fail2.rs:16:18
...
LL | const Z: usize = bar(double, 2); // FIXME: should fail to typeck someday
| --------------------------------
| --------------
|
note: the lint level is defined here
--> $DIR/const_fn_ptr_fail2.rs:4:10

View file

@ -14,9 +14,7 @@ warning: any use of this value will cause an error
--> $DIR/erroneous-const.rs:6:22
|
LL | const VOID: () = [()][2];
| -----------------^^^^^^^-
| |
| index out of bounds: the length is 1 but the index is 2
| -------------- ^^^^^^^ index out of bounds: the length is 1 but the index is 2
|
note: the lint level is defined here
--> $DIR/erroneous-const.rs:2:9
@ -46,9 +44,7 @@ warning: any use of this value will cause an error
--> $DIR/erroneous-const.rs:6:22
|
LL | const VOID: () = [()][2];
| -----------------^^^^^^^-
| |
| index out of bounds: the length is 1 but the index is 2
| -------------- ^^^^^^^ index out of bounds: the length is 1 but the index is 2
|
note: the lint level is defined here
--> $DIR/erroneous-const.rs:2:9

View file

@ -14,9 +14,7 @@ warning: any use of this value will cause an error
--> $DIR/erroneous-const2.rs:6:22
|
LL | const VOID: () = [()][2];
| -----------------^^^^^^^-
| |
| index out of bounds: the length is 1 but the index is 2
| -------------- ^^^^^^^ index out of bounds: the length is 1 but the index is 2
|
note: the lint level is defined here
--> $DIR/erroneous-const2.rs:2:9
@ -40,9 +38,7 @@ warning: any use of this value will cause an error
--> $DIR/erroneous-const2.rs:6:22
|
LL | const VOID: () = [()][2];
| -----------------^^^^^^^-
| |
| index out of bounds: the length is 1 but the index is 2
| -------------- ^^^^^^^ index out of bounds: the length is 1 but the index is 2
|
note: the lint level is defined here
--> $DIR/erroneous-const2.rs:2:9

View file

@ -2,7 +2,7 @@ error: untyped pointers are not allowed in constant
--> $DIR/alloc_intrinsic_nontransient_fail.rs:6:1
|
LL | const FOO: *const i32 = foo();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error

View file

@ -2,7 +2,7 @@ error[E0080]: it is undefined behavior to use this value
--> $DIR/alloc_intrinsic_uninit.rs:8:1
|
LL | const BAR: &i32 = unsafe { &*(intrinsics::const_allocate(4, 4) as *mut i32) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>: encountered uninitialized bytes, but expected initialized bytes
| ^^^^^^^^^^^^^^^ constructing invalid value at .<deref>: encountered uninitialized bytes, but expected initialized bytes
|
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
= note: the raw bytes of the constant (size: 4, align: 4) {

View file

@ -2,7 +2,7 @@ error[E0080]: it is undefined behavior to use this value
--> $DIR/alloc_intrinsic_uninit.rs:8:1
|
LL | const BAR: &i32 = unsafe { &*(intrinsics::const_allocate(4, 4) as *mut i32) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>: encountered uninitialized bytes, but expected initialized bytes
| ^^^^^^^^^^^^^^^ constructing invalid value at .<deref>: encountered uninitialized bytes, but expected initialized bytes
|
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
= note: the raw bytes of the constant (size: 8, align: 8) {

View file

@ -2,7 +2,7 @@ error: untyped pointers are not allowed in constant
--> $DIR/alloc_intrinsic_untyped.rs:6:1
|
LL | const BAR: *mut i32 = unsafe { intrinsics::const_allocate(4, 4) as *mut i32};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error

View file

@ -2,9 +2,7 @@ warning: any use of this value will cause an error
--> $DIR/index-out-of-bounds-never-type.rs:10:61
|
LL | const VOID: ! = { let x = 0 * std::mem::size_of::<T>(); [][x] };
| --------------------------------------------------------^^^^^---
| |
| index out of bounds: the length is 0 but the index is 0
| ------------- ^^^^^ index out of bounds: the length is 0 but the index is 0
|
note: the lint level is defined here
--> $DIR/index-out-of-bounds-never-type.rs:4:9
@ -27,9 +25,7 @@ warning: any use of this value will cause an error
--> $DIR/index-out-of-bounds-never-type.rs:10:61
|
LL | const VOID: ! = { let x = 0 * std::mem::size_of::<T>(); [][x] };
| --------------------------------------------------------^^^^^---
| |
| index out of bounds: the length is 0 but the index is 0
| ------------- ^^^^^ index out of bounds: the length is 0 but the index is 0
|
note: the lint level is defined here
--> $DIR/index-out-of-bounds-never-type.rs:4:9

View file

@ -2,9 +2,7 @@ warning: any use of this value will cause an error
--> $DIR/issue-43197.rs:10:20
|
LL | const X: u32 = 0 - 1;
| ---------------^^^^^-
| |
| attempt to compute `0_u32 - 1_u32`, which would overflow
| ------------ ^^^^^ attempt to compute `0_u32 - 1_u32`, which would overflow
|
note: the lint level is defined here
--> $DIR/issue-43197.rs:3:9
@ -18,9 +16,7 @@ warning: any use of this value will cause an error
--> $DIR/issue-43197.rs:13:24
|
LL | const Y: u32 = foo(0 - 1);
| -------------------^^^^^--
| |
| attempt to compute `0_u32 - 1_u32`, which would overflow
| ------------ ^^^^^ attempt to compute `0_u32 - 1_u32`, which would overflow
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -65,9 +61,7 @@ warning: any use of this value will cause an error
--> $DIR/issue-43197.rs:10:20
|
LL | const X: u32 = 0 - 1;
| ---------------^^^^^-
| |
| attempt to compute `0_u32 - 1_u32`, which would overflow
| ------------ ^^^^^ attempt to compute `0_u32 - 1_u32`, which would overflow
|
note: the lint level is defined here
--> $DIR/issue-43197.rs:3:9
@ -82,9 +76,7 @@ warning: any use of this value will cause an error
--> $DIR/issue-43197.rs:13:24
|
LL | const Y: u32 = foo(0 - 1);
| -------------------^^^^^--
| |
| attempt to compute `0_u32 - 1_u32`, which would overflow
| ------------ ^^^^^ attempt to compute `0_u32 - 1_u32`, which would overflow
|
note: the lint level is defined here
--> $DIR/issue-43197.rs:3:9

View file

@ -12,9 +12,7 @@ warning: any use of this value will cause an error
--> $DIR/issue-44578.rs:15:24
|
LL | const AMT: usize = [A::AMT][(A::AMT > B::AMT) as usize];
| -------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
| |
| index out of bounds: the length is 1 but the index is 1
| ---------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ index out of bounds: the length is 1 but the index is 1
|
note: the lint level is defined here
--> $DIR/issue-44578.rs:3:10

View file

@ -2,9 +2,7 @@ error: any use of this value will cause an error
--> $DIR/issue-50814-2.rs:14:24
|
LL | const BAR: usize = [5, 6, 7][T::BOO];
| -------------------^^^^^^^^^^^^^^^^^-
| |
| index out of bounds: the length is 3 but the index is 42
| ---------------- ^^^^^^^^^^^^^^^^^ index out of bounds: the length is 3 but the index is 42
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@ -30,9 +28,7 @@ error: any use of this value will cause an error
--> $DIR/issue-50814-2.rs:14:24
|
LL | const BAR: usize = [5, 6, 7][T::BOO];
| -------------------^^^^^^^^^^^^^^^^^-
| |
| index out of bounds: the length is 3 but the index is 42
| ---------------- ^^^^^^^^^^^^^^^^^ index out of bounds: the length is 3 but the index is 42
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!

View file

@ -2,9 +2,7 @@ error: any use of this value will cause an error
--> $DIR/issue-50814.rs:15:21
|
LL | const MAX: u8 = A::MAX + B::MAX;
| ----------------^^^^^^^^^^^^^^^-
| |
| attempt to compute `u8::MAX + u8::MAX`, which would overflow
| ------------- ^^^^^^^^^^^^^^^ attempt to compute `u8::MAX + u8::MAX`, which would overflow
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@ -30,9 +28,7 @@ error: any use of this value will cause an error
--> $DIR/issue-50814.rs:15:21
|
LL | const MAX: u8 = A::MAX + B::MAX;
| ----------------^^^^^^^^^^^^^^^-
| |
| attempt to compute `u8::MAX + u8::MAX`, which would overflow
| ------------- ^^^^^^^^^^^^^^^ attempt to compute `u8::MAX + u8::MAX`, which would overflow
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!

View file

@ -1,16 +1,11 @@
error: any use of this value will cause an error
--> $DIR/partial_ptr_overwrite.rs:8:9
|
LL | / const PARTIAL_OVERWRITE: () = {
LL | | let mut p = &42;
LL | | unsafe {
LL | | let ptr: *mut _ = &mut p;
LL | | *(ptr as *mut u8) = 123;
| | ^^^^^^^^^^^^^^^^^^^^^^^ unable to overwrite parts of a pointer in memory at alloc4
... |
LL | | let x = *p;
LL | | };
| |__-
LL | const PARTIAL_OVERWRITE: () = {
| ---------------------------
...
LL | *(ptr as *mut u8) = 123;
| ^^^^^^^^^^^^^^^^^^^^^^^ unable to overwrite parts of a pointer in memory at alloc4
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@ -22,16 +17,11 @@ Future incompatibility report: Future breakage diagnostic:
error: any use of this value will cause an error
--> $DIR/partial_ptr_overwrite.rs:8:9
|
LL | / const PARTIAL_OVERWRITE: () = {
LL | | let mut p = &42;
LL | | unsafe {
LL | | let ptr: *mut _ = &mut p;
LL | | *(ptr as *mut u8) = 123;
| | ^^^^^^^^^^^^^^^^^^^^^^^ unable to overwrite parts of a pointer in memory at alloc4
... |
LL | | let x = *p;
LL | | };
| |__-
LL | const PARTIAL_OVERWRITE: () = {
| ---------------------------
...
LL | *(ptr as *mut u8) = 123;
| ^^^^^^^^^^^^^^^^^^^^^^^ unable to overwrite parts of a pointer in memory at alloc4
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!

View file

@ -43,21 +43,15 @@ LL | [1, 2, 3][4]
warning: any use of this value will cause an error
--> $DIR/promoted_errors.rs:15:5
|
LL | 0 - 1
| ^^^^^
| |
| attempt to compute `0_u32 - 1_u32`, which would overflow
| inside `overflow` at $DIR/promoted_errors.rs:15:5
| inside `X` at $DIR/promoted_errors.rs:43:29
LL | 0 - 1
| ^^^^^
| |
| attempt to compute `0_u32 - 1_u32`, which would overflow
| inside `overflow` at $DIR/promoted_errors.rs:15:5
| inside `X` at $DIR/promoted_errors.rs:43:29
...
LL | / const X: () = {
LL | | let _x: &'static u32 = &overflow();
LL | |
LL | |
... |
LL | | let _x: &'static i32 = &oob();
LL | | };
| |__-
LL | const X: () = {
| -----------
|
note: the lint level is defined here
--> $DIR/promoted_errors.rs:11:9
@ -70,15 +64,10 @@ LL | #![warn(const_err, arithmetic_overflow, unconditional_panic)]
warning: any use of this value will cause an error
--> $DIR/promoted_errors.rs:43:28
|
LL | / const X: () = {
LL | | let _x: &'static u32 = &overflow();
| | ^^^^^^^^^^^ referenced constant has errors
LL | |
LL | |
... |
LL | | let _x: &'static i32 = &oob();
LL | | };
| |__-
LL | const X: () = {
| -----------
LL | let _x: &'static u32 = &overflow();
| ^^^^^^^^^^^ referenced constant has errors
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -89,21 +78,15 @@ Future incompatibility report: Future breakage diagnostic:
warning: any use of this value will cause an error
--> $DIR/promoted_errors.rs:15:5
|
LL | 0 - 1
| ^^^^^
| |
| attempt to compute `0_u32 - 1_u32`, which would overflow
| inside `overflow` at $DIR/promoted_errors.rs:15:5
| inside `X` at $DIR/promoted_errors.rs:43:29
LL | 0 - 1
| ^^^^^
| |
| attempt to compute `0_u32 - 1_u32`, which would overflow
| inside `overflow` at $DIR/promoted_errors.rs:15:5
| inside `X` at $DIR/promoted_errors.rs:43:29
...
LL | / const X: () = {
LL | | let _x: &'static u32 = &overflow();
LL | |
LL | |
... |
LL | | let _x: &'static i32 = &oob();
LL | | };
| |__-
LL | const X: () = {
| -----------
|
note: the lint level is defined here
--> $DIR/promoted_errors.rs:11:9
@ -117,15 +100,10 @@ Future breakage diagnostic:
warning: any use of this value will cause an error
--> $DIR/promoted_errors.rs:43:28
|
LL | / const X: () = {
LL | | let _x: &'static u32 = &overflow();
| | ^^^^^^^^^^^ referenced constant has errors
LL | |
LL | |
... |
LL | | let _x: &'static i32 = &oob();
LL | | };
| |__-
LL | const X: () = {
| -----------
LL | let _x: &'static u32 = &overflow();
| ^^^^^^^^^^^ referenced constant has errors
|
note: the lint level is defined here
--> $DIR/promoted_errors.rs:11:9

View file

@ -43,21 +43,15 @@ LL | [1, 2, 3][4]
warning: any use of this value will cause an error
--> $DIR/promoted_errors.rs:21:5
|
LL | 1 / 0
| ^^^^^
| |
| attempt to divide `1_i32` by zero
| inside `div_by_zero1` at $DIR/promoted_errors.rs:21:5
| inside `X` at $DIR/promoted_errors.rs:46:29
LL | 1 / 0
| ^^^^^
| |
| attempt to divide `1_i32` by zero
| inside `div_by_zero1` at $DIR/promoted_errors.rs:21:5
| inside `X` at $DIR/promoted_errors.rs:46:29
...
LL | / const X: () = {
LL | | let _x: &'static u32 = &overflow();
LL | |
LL | |
... |
LL | | let _x: &'static i32 = &oob();
LL | | };
| |__-
LL | const X: () = {
| -----------
|
note: the lint level is defined here
--> $DIR/promoted_errors.rs:11:9
@ -70,16 +64,11 @@ LL | #![warn(const_err, arithmetic_overflow, unconditional_panic)]
warning: any use of this value will cause an error
--> $DIR/promoted_errors.rs:46:28
|
LL | / const X: () = {
LL | | let _x: &'static u32 = &overflow();
LL | |
LL | |
LL | | let _x: &'static i32 = &div_by_zero1();
| | ^^^^^^^^^^^^^^^ referenced constant has errors
... |
LL | | let _x: &'static i32 = &oob();
LL | | };
| |__-
LL | const X: () = {
| -----------
...
LL | let _x: &'static i32 = &div_by_zero1();
| ^^^^^^^^^^^^^^^ referenced constant has errors
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -90,21 +79,15 @@ Future incompatibility report: Future breakage diagnostic:
warning: any use of this value will cause an error
--> $DIR/promoted_errors.rs:21:5
|
LL | 1 / 0
| ^^^^^
| |
| attempt to divide `1_i32` by zero
| inside `div_by_zero1` at $DIR/promoted_errors.rs:21:5
| inside `X` at $DIR/promoted_errors.rs:46:29
LL | 1 / 0
| ^^^^^
| |
| attempt to divide `1_i32` by zero
| inside `div_by_zero1` at $DIR/promoted_errors.rs:21:5
| inside `X` at $DIR/promoted_errors.rs:46:29
...
LL | / const X: () = {
LL | | let _x: &'static u32 = &overflow();
LL | |
LL | |
... |
LL | | let _x: &'static i32 = &oob();
LL | | };
| |__-
LL | const X: () = {
| -----------
|
note: the lint level is defined here
--> $DIR/promoted_errors.rs:11:9
@ -118,16 +101,11 @@ Future breakage diagnostic:
warning: any use of this value will cause an error
--> $DIR/promoted_errors.rs:46:28
|
LL | / const X: () = {
LL | | let _x: &'static u32 = &overflow();
LL | |
LL | |
LL | | let _x: &'static i32 = &div_by_zero1();
| | ^^^^^^^^^^^^^^^ referenced constant has errors
... |
LL | | let _x: &'static i32 = &oob();
LL | | };
| |__-
LL | const X: () = {
| -----------
...
LL | let _x: &'static i32 = &div_by_zero1();
| ^^^^^^^^^^^^^^^ referenced constant has errors
|
note: the lint level is defined here
--> $DIR/promoted_errors.rs:11:9

View file

@ -43,21 +43,15 @@ LL | [1, 2, 3][4]
warning: any use of this value will cause an error
--> $DIR/promoted_errors.rs:15:5
|
LL | 0 - 1
| ^^^^^
| |
| attempt to compute `0_u32 - 1_u32`, which would overflow
| inside `overflow` at $DIR/promoted_errors.rs:15:5
| inside `X` at $DIR/promoted_errors.rs:43:29
LL | 0 - 1
| ^^^^^
| |
| attempt to compute `0_u32 - 1_u32`, which would overflow
| inside `overflow` at $DIR/promoted_errors.rs:15:5
| inside `X` at $DIR/promoted_errors.rs:43:29
...
LL | / const X: () = {
LL | | let _x: &'static u32 = &overflow();
LL | |
LL | |
... |
LL | | let _x: &'static i32 = &oob();
LL | | };
| |__-
LL | const X: () = {
| -----------
|
note: the lint level is defined here
--> $DIR/promoted_errors.rs:11:9
@ -70,15 +64,10 @@ LL | #![warn(const_err, arithmetic_overflow, unconditional_panic)]
warning: any use of this value will cause an error
--> $DIR/promoted_errors.rs:43:28
|
LL | / const X: () = {
LL | | let _x: &'static u32 = &overflow();
| | ^^^^^^^^^^^ referenced constant has errors
LL | |
LL | |
... |
LL | | let _x: &'static i32 = &oob();
LL | | };
| |__-
LL | const X: () = {
| -----------
LL | let _x: &'static u32 = &overflow();
| ^^^^^^^^^^^ referenced constant has errors
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@ -89,21 +78,15 @@ Future incompatibility report: Future breakage diagnostic:
warning: any use of this value will cause an error
--> $DIR/promoted_errors.rs:15:5
|
LL | 0 - 1
| ^^^^^
| |
| attempt to compute `0_u32 - 1_u32`, which would overflow
| inside `overflow` at $DIR/promoted_errors.rs:15:5
| inside `X` at $DIR/promoted_errors.rs:43:29
LL | 0 - 1
| ^^^^^
| |
| attempt to compute `0_u32 - 1_u32`, which would overflow
| inside `overflow` at $DIR/promoted_errors.rs:15:5
| inside `X` at $DIR/promoted_errors.rs:43:29
...
LL | / const X: () = {
LL | | let _x: &'static u32 = &overflow();
LL | |
LL | |
... |
LL | | let _x: &'static i32 = &oob();
LL | | };
| |__-
LL | const X: () = {
| -----------
|
note: the lint level is defined here
--> $DIR/promoted_errors.rs:11:9
@ -117,15 +100,10 @@ Future breakage diagnostic:
warning: any use of this value will cause an error
--> $DIR/promoted_errors.rs:43:28
|
LL | / const X: () = {
LL | | let _x: &'static u32 = &overflow();
| | ^^^^^^^^^^^ referenced constant has errors
LL | |
LL | |
... |
LL | | let _x: &'static i32 = &oob();
LL | | };
| |__-
LL | const X: () = {
| -----------
LL | let _x: &'static u32 = &overflow();
| ^^^^^^^^^^^ referenced constant has errors
|
note: the lint level is defined here
--> $DIR/promoted_errors.rs:11:9

View file

@ -2,9 +2,7 @@ warning: any use of this value will cause an error
--> $DIR/pub_const_err.rs:6:20
|
LL | pub const Z: u32 = 0 - 1;
| -------------------^^^^^-
| |
| attempt to compute `0_u32 - 1_u32`, which would overflow
| ---------------- ^^^^^ attempt to compute `0_u32 - 1_u32`, which would overflow
|
note: the lint level is defined here
--> $DIR/pub_const_err.rs:2:9
@ -21,9 +19,7 @@ warning: any use of this value will cause an error
--> $DIR/pub_const_err.rs:6:20
|
LL | pub const Z: u32 = 0 - 1;
| -------------------^^^^^-
| |
| attempt to compute `0_u32 - 1_u32`, which would overflow
| ---------------- ^^^^^ attempt to compute `0_u32 - 1_u32`, which would overflow
|
note: the lint level is defined here
--> $DIR/pub_const_err.rs:2:9

View file

@ -2,9 +2,7 @@ warning: any use of this value will cause an error
--> $DIR/pub_const_err_bin.rs:4:20
|
LL | pub const Z: u32 = 0 - 1;
| -------------------^^^^^-
| |
| attempt to compute `0_u32 - 1_u32`, which would overflow
| ---------------- ^^^^^ attempt to compute `0_u32 - 1_u32`, which would overflow
|
note: the lint level is defined here
--> $DIR/pub_const_err_bin.rs:2:9
@ -21,9 +19,7 @@ warning: any use of this value will cause an error
--> $DIR/pub_const_err_bin.rs:4:20
|
LL | pub const Z: u32 = 0 - 1;
| -------------------^^^^^-
| |
| attempt to compute `0_u32 - 1_u32`, which would overflow
| ---------------- ^^^^^ attempt to compute `0_u32 - 1_u32`, which would overflow
|
note: the lint level is defined here
--> $DIR/pub_const_err_bin.rs:2:9

View file

@ -2,9 +2,7 @@ error: any use of this value will cause an error
--> $DIR/ref_to_int_match.rs:25:27
|
LL | const BAR: Int = unsafe { Foo { r: &42 }.f };
| --------------------------^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| -------------- ^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@ -29,9 +27,7 @@ error: any use of this value will cause an error
--> $DIR/ref_to_int_match.rs:25:27
|
LL | const BAR: Int = unsafe { Foo { r: &42 }.f };
| --------------------------^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| -------------- ^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!

View file

@ -2,9 +2,7 @@ error: any use of this value will cause an error
--> $DIR/ref_to_int_match.rs:25:27
|
LL | const BAR: Int = unsafe { Foo { r: &42 }.f };
| --------------------------^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| -------------- ^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@ -29,9 +27,7 @@ error: any use of this value will cause an error
--> $DIR/ref_to_int_match.rs:25:27
|
LL | const BAR: Int = unsafe { Foo { r: &42 }.f };
| --------------------------^^^^^^^^^^^^^^^^---
| |
| unable to turn pointer into raw bytes
| -------------- ^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!

Some files were not shown because too many files have changed in this diff Show more