if let Some(virtual_dir) = &sess.opts.unstable_opts.simulate_remapped_rust_src_base
{
if let Some(real_dir) = &sess.opts.real_rust_source_base_dir {
- if let rustc_span::FileName::Real(ref mut old_name) = name {
- if let rustc_span::RealFileName::LocalPath(local) = old_name {
- if let Ok(rest) = local.strip_prefix(real_dir) {
- *old_name = rustc_span::RealFileName::Remapped {
- local_path: None,
- virtual_name: virtual_dir.join(rest),
- };
+ for subdir in ["library", "compiler"] {
+ if let rustc_span::FileName::Real(ref mut old_name) = name {
+ if let rustc_span::RealFileName::LocalPath(local) = old_name {
+ if let Ok(rest) = local.strip_prefix(real_dir.join(subdir)) {
+ *old_name = rustc_span::RealFileName::Remapped {
+ local_path: None,
+ virtual_name: virtual_dir.join(subdir).join(rest),
+ };
+ }
}
}
}
let is_local_static =
if let DefKind::Static(_) = kind { def_id.is_local() } else { false };
if !self.item_is_accessible(def_id) && !is_local_static {
- let sess = self.tcx.sess;
- let sm = sess.source_map();
- let name = match qpath {
- hir::QPath::Resolved(..) | hir::QPath::LangItem(..) => {
- sm.span_to_snippet(qpath.span()).ok()
+ let name = match *qpath {
+ hir::QPath::LangItem(it, ..) => {
+ self.tcx.lang_items().get(it).map(|did| self.tcx.def_path_str(did))
}
+ hir::QPath::Resolved(_, path) => Some(self.tcx.def_path_str(path.res.def_id())),
hir::QPath::TypeRelative(_, segment) => Some(segment.ident.to_string()),
};
let kind = kind.descr(def_id);
+ let sess = self.tcx.sess;
let _ = match name {
Some(name) => {
sess.emit_err(ItemIsPrivate { span, kind, descr: (&name).into() })
format!("does not implement `{}`", trait_pred.print_modifiers_and_trait_path())
};
- let mut explain_yield = |interior_span: Span,
- yield_span: Span,
- scope_span: Option<Span>| {
- let mut span = MultiSpan::from_span(yield_span);
- if let Ok(snippet) = source_map.span_to_snippet(interior_span) {
- // #70935: If snippet contains newlines, display "the value" instead
- // so that we do not emit complex diagnostics.
- let snippet = &format!("`{}`", snippet);
- let snippet = if snippet.contains('\n') { "the value" } else { snippet };
+ let mut explain_yield =
+ |interior_span: Span, yield_span: Span, scope_span: Option<Span>| {
+ let mut span = MultiSpan::from_span(yield_span);
+ let snippet = match source_map.span_to_snippet(interior_span) {
+ // #70935: If snippet contains newlines, display "the value" instead
+ // so that we do not emit complex diagnostics.
+ Ok(snippet) if !snippet.contains('\n') => format!("`{}`", snippet),
+ _ => "the value".to_string(),
+ };
// note: future is not `Send` as this value is used across an await
// --> $DIR/issue-70935-complex-spans.rs:13:9
// |
if let Some((span, msg)) = scope_note {
err.span_note(span, &msg);
}
- }
- };
+ };
match interior_or_upvar_span {
GeneratorInteriorOrUpvar::Interior(interior_span, interior_extra_info) => {
if let Some((scope_span, yield_span, expr, from_awaited_ty)) = interior_extra_info {
note: required by a bound in `DiagnosticBuilder::<'a, G>::set_arg`
--> $COMPILER_DIR/rustc_errors/src/diagnostic_builder.rs:LL:CC
|
-LL | arg: impl IntoDiagnosticArg,
- | ^^^^^^^^^^^^^^^^^ required by this bound in `DiagnosticBuilder::<'a, G>::set_arg`
+ = note: required by this bound in `DiagnosticBuilder::<'a, G>::set_arg`
= note: this error originates in the derive macro `Diagnostic` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 83 previous errors
= note: struct `core::alloc::Layout` and struct `Layout` have similar names, but are actually distinct types
note: struct `core::alloc::Layout` is defined in crate `core`
--> $SRC_DIR/core/src/alloc/layout.rs:LL:COL
- |
-LL | pub struct Layout {
- | ^^^^^^^^^^^^^^^^^
note: struct `Layout` is defined in the current crate
--> $DIR/alloc-error-handler-bad-signature-2.rs:7:1
|
|
note: associated type defined here
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
- |
-LL | type Item;
- | ^^^^^^^^^
error: aborting due to 2 previous errors
= help: the trait `Sized` is not implemented for `[u8]`
note: required by a bound in `Vec`
--> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
- |
-LL | pub struct Vec<T, #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global> {
- | ^ required by this bound in `Vec`
error: aborting due to previous error
|
note: required by a bound in `Add`
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
- |
-LL | pub trait Add<Rhs = Self> {
- | ^^^^^^^^^^ required by this bound in `Add`
help: consider further restricting `Self`
|
LL | trait ArithmeticOps: Add<Output=Self> + Sub<Output=Self> + Mul<Output=Self> + Div<Output=Self> + Sized {}
found `async` block `[async block@$DIR/generator-desc.rs:10:19: 10:27]`
note: function defined here
--> $SRC_DIR/core/src/future/mod.rs:LL:COL
- |
-LL | pub const fn identity_future<O, Fut: Future<Output = O>>(f: Fut) -> Fut {
- | ^^^^^^^^^^^^^^^
error[E0308]: mismatched types
--> $DIR/generator-desc.rs:12:16
|
note: required by a bound in `File::open`
--> $SRC_DIR/std/src/fs.rs:LL:COL
- |
-LL | pub fn open<P: AsRef<Path>>(path: P) -> io::Result<File> {
- | ^^^^^^^^^^^ required by this bound in `File::open`
error: aborting due to previous error
| |
| expected 2 generic arguments
|
-note: enum defined here, with 2 generic parameters: `T`, `E`
- --> $SRC_DIR/core/src/result.rs:LL:COL
- |
-LL | pub enum Result<T, E> {
- | ^^^^^^ - -
help: add missing generic argument
|
LL | async fn copy() -> Result<(), E>
| ^^^^^
note: required by a bound in `Pin::<P>::new`
--> $SRC_DIR/core/src/pin.rs:LL:COL
- |
-LL | impl<P: Deref<Target: Unpin>> Pin<P> {
- | ^^^^^ required by this bound in `Pin::<P>::new`
error: aborting due to previous error
...
LL | self.sleep.poll(cx)
| ^^^^ method not found in `Sleep`
+ --> $SRC_DIR/core/src/future/future.rs:LL:COL
|
- ::: $SRC_DIR/core/src/future/future.rs:LL:COL
- |
-LL | fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>;
- | ---- the method is available for `Pin<&mut Sleep>` here
+ = note: the method is available for `Pin<&mut Sleep>` here
|
help: consider wrapping the receiver expression with the appropriate type
|
| ^^^ value used here after move
|
note: calling this operator moves the left-hand side
- --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
+ --> $DIR/binop-consume-args.rs:6:5
|
-LL | fn add(self, rhs: Rhs) -> Self::Output;
- | ^^^^
+LL | lhs + rhs;
+ | ^^^^^^^^^
help: consider further restricting this bound
|
LL | fn add<A: Add<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
| ^^^ value used here after move
|
note: calling this operator moves the left-hand side
- --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
+ --> $DIR/binop-consume-args.rs:12:5
|
-LL | fn sub(self, rhs: Rhs) -> Self::Output;
- | ^^^^
+LL | lhs - rhs;
+ | ^^^^^^^^^
help: consider further restricting this bound
|
LL | fn sub<A: Sub<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
| ^^^ value used here after move
|
note: calling this operator moves the left-hand side
- --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
+ --> $DIR/binop-consume-args.rs:18:5
|
-LL | fn mul(self, rhs: Rhs) -> Self::Output;
- | ^^^^
+LL | lhs * rhs;
+ | ^^^^^^^^^
help: consider further restricting this bound
|
LL | fn mul<A: Mul<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
| ^^^ value used here after move
|
note: calling this operator moves the left-hand side
- --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
+ --> $DIR/binop-consume-args.rs:24:5
|
-LL | fn div(self, rhs: Rhs) -> Self::Output;
- | ^^^^
+LL | lhs / rhs;
+ | ^^^^^^^^^
help: consider further restricting this bound
|
LL | fn div<A: Div<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
| ^^^ value used here after move
|
note: calling this operator moves the left-hand side
- --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
+ --> $DIR/binop-consume-args.rs:30:5
|
-LL | fn rem(self, rhs: Rhs) -> Self::Output;
- | ^^^^
+LL | lhs % rhs;
+ | ^^^^^^^^^
help: consider further restricting this bound
|
LL | fn rem<A: Rem<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
| ^^^ value used here after move
|
note: calling this operator moves the left-hand side
- --> $SRC_DIR/core/src/ops/bit.rs:LL:COL
+ --> $DIR/binop-consume-args.rs:36:5
|
-LL | fn bitand(self, rhs: Rhs) -> Self::Output;
- | ^^^^
+LL | lhs & rhs;
+ | ^^^^^^^^^
help: consider further restricting this bound
|
LL | fn bitand<A: BitAnd<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
| ^^^ value used here after move
|
note: calling this operator moves the left-hand side
- --> $SRC_DIR/core/src/ops/bit.rs:LL:COL
+ --> $DIR/binop-consume-args.rs:42:5
|
-LL | fn bitor(self, rhs: Rhs) -> Self::Output;
- | ^^^^
+LL | lhs | rhs;
+ | ^^^^^^^^^
help: consider further restricting this bound
|
LL | fn bitor<A: BitOr<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
| ^^^ value used here after move
|
note: calling this operator moves the left-hand side
- --> $SRC_DIR/core/src/ops/bit.rs:LL:COL
+ --> $DIR/binop-consume-args.rs:48:5
|
-LL | fn bitxor(self, rhs: Rhs) -> Self::Output;
- | ^^^^
+LL | lhs ^ rhs;
+ | ^^^^^^^^^
help: consider further restricting this bound
|
LL | fn bitxor<A: BitXor<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
| ^^^ value used here after move
|
note: calling this operator moves the left-hand side
- --> $SRC_DIR/core/src/ops/bit.rs:LL:COL
+ --> $DIR/binop-consume-args.rs:54:5
|
-LL | fn shl(self, rhs: Rhs) -> Self::Output;
- | ^^^^
+LL | lhs << rhs;
+ | ^^^^^^^^^^
help: consider further restricting this bound
|
LL | fn shl<A: Shl<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
| ^^^ value used here after move
|
note: calling this operator moves the left-hand side
- --> $SRC_DIR/core/src/ops/bit.rs:LL:COL
+ --> $DIR/binop-consume-args.rs:60:5
|
-LL | fn shr(self, rhs: Rhs) -> Self::Output;
- | ^^^^
+LL | lhs >> rhs;
+ | ^^^^^^^^^^
help: consider further restricting this bound
|
LL | fn shr<A: Shr<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
| `x` moved due to usage in operator
|
note: calling this operator moves the left-hand side
- --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
+ --> $DIR/binop-move-semantics.rs:6:5
|
-LL | fn add(self, rhs: Rhs) -> Self::Output;
- | ^^^^
+LL | / x
+LL | | +
+LL | | x;
+ | |_____^
help: consider further restricting this bound
|
LL | fn double_move<T: Add<Output=()> + Copy>(x: T) {
| |______- `*m` moved due to usage in operator
|
note: calling this operator moves the left-hand side
- --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
+ --> $DIR/binop-move-semantics.rs:30:5
|
-LL | fn add(self, rhs: Rhs) -> Self::Output;
- | ^^^^
+LL | / *m
+LL | | +
+LL | | *n;
+ | |______^
error[E0507]: cannot move out of `*n` which is behind a shared reference
--> $DIR/binop-move-semantics.rs:32:5
| ^^^^^^^^ 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> {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0369]: cannot subtract `A` from `A`
--> $DIR/issue-28837.rs:8:7
| ^^^^^^^^ 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> {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0369]: cannot multiply `A` by `A`
--> $DIR/issue-28837.rs:10:7
| ^^^^^^^^ 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> {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0369]: cannot divide `A` by `A`
--> $DIR/issue-28837.rs:12:7
| ^^^^^^^^ 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> {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0369]: cannot mod `A` by `A`
--> $DIR/issue-28837.rs:14:7
| ^^^^^^^^ 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> {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0369]: no implementation for `A & A`
--> $DIR/issue-28837.rs:16:7
| ^^^^^^^^ 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> {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0369]: no implementation for `A | A`
--> $DIR/issue-28837.rs:18:7
| ^^^^^^^^ 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> {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0369]: no implementation for `A << A`
--> $DIR/issue-28837.rs:20:7
| ^^^^^^^^ 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> {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0369]: no implementation for `A >> A`
--> $DIR/issue-28837.rs:22:7
| ^^^^^^^^ 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> {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0369]: binary operation `==` cannot be applied to type `A`
--> $DIR/issue-28837.rs:24:7
| ^^^^^^^^^^^^ 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> {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error
|
note: this function takes ownership of the receiver `self`, which moves value
--> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
- |
-LL | fn into_iter(self) -> Self::IntoIter;
- | ^^^^
error: aborting due to previous error
|
note: this function takes ownership of the receiver `self`, which moves `foo`
--> $SRC_DIR/core/src/option.rs:LL:COL
- |
-LL | pub const fn unwrap(self) -> T {
- | ^^^^
error[E0382]: use of moved value: `foo`
--> $DIR/issue-83760.rs:37:14
| ^^^^^^^^^^^^^^^^^^
note: this function takes ownership of the receiver `self`, which moves `foo`
--> $SRC_DIR/core/src/option.rs:LL:COL
- |
-LL | pub const fn unwrap(self) -> T {
- | ^^^^
error: aborting due to 3 previous errors
|
note: this function takes ownership of the receiver `self`, which moves `state`
--> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
- |
-LL | fn into_iter(self) -> Self::IntoIter;
- | ^^^^
help: consider creating a fresh reborrow of `state` here
|
LL | for _ in &mut *state {}
|
note: this function takes ownership of the receiver `self`, which moves `*cb`
--> $SRC_DIR/core/src/option.rs:LL:COL
- |
-LL | pub const fn map<U, F>(self, f: F) -> Option<U>
- | ^^^^
error[E0596]: cannot borrow `*cb` as mutable, as it is behind a `&` reference
--> $DIR/suggest-as-ref-on-mut-closure.rs:12:26
|
note: this function takes ownership of the receiver `self`, which moves `y`
--> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
- |
-LL | fn into_iter(self) -> Self::IntoIter;
- | ^^^^
error: aborting due to previous error
= help: the trait `Sized` is not implemented for `[u8]`
note: required by a bound in `Box::<T, A>::into_boxed_slice`
--> $SRC_DIR/alloc/src/boxed.rs:LL:COL
- |
-LL | impl<T, A: Allocator> Box<T, A> {
- | ^ required by this bound in `Box::<T, A>::into_boxed_slice`
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
--> $DIR/into-boxed-slice-fail.rs:7:13
= help: the trait `Sized` is not implemented for `dyn Debug`
note: required by a bound in `Box::<T, A>::into_boxed_slice`
--> $SRC_DIR/alloc/src/boxed.rs:LL:COL
- |
-LL | impl<T, A: Allocator> Box<T, A> {
- | ^ required by this bound in `Box::<T, A>::into_boxed_slice`
error[E0277]: the size for values of type `dyn Debug` cannot be known at compilation time
--> $DIR/into-boxed-slice-fail.rs:11:13
|
LL | self , ... , self , self , ... ) where F : FnOnce ( & 'a & 'b usize ) {
| ^
+ --> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
- ::: $SRC_DIR/core/src/ops/function.rs:LL:COL
- |
-LL | pub trait Fn<Args: Tuple>: FnMut<Args> {
- | -------------------------------------- similarly named trait `Fn` defined here
+ = note: similarly named trait `Fn` defined here
|
help: a trait with a similar name exists
|
= note: [async fn body@$DIR/async.rs:7:29: 9:2] must be a future or must implement `IntoFuture` to be awaited
note: required by a bound in `identity_future`
--> $SRC_DIR/core/src/future/mod.rs:LL:COL
- |
-LL | pub const fn identity_future<O, Fut: Future<Output = O>>(f: Fut) -> Fut {
- | ^^^^^^^^^^^^^^^^^^ required by this bound in `identity_future`
error[E0277]: the size for values of type `<[async fn body@$DIR/async.rs:7:29: 9:2] as Future>::Output` cannot be known at compilation time
--> $DIR/async.rs:7:29
= help: the trait `Sized` is not implemented for `<[async fn body@$DIR/async.rs:7:29: 9:2] as Future>::Output`
note: required by a bound in `identity_future`
--> $SRC_DIR/core/src/future/mod.rs:LL:COL
- |
-LL | pub const fn identity_future<O, Fut: Future<Output = O>>(f: Fut) -> Fut {
- | ^ required by this bound in `identity_future`
error[E0277]: `[async fn body@$DIR/async.rs:7:29: 9:2]` is not a future
--> $DIR/async.rs:7:25
= note: wrap the `{integer}` in a closure with no arguments: `|| { /* code */ }`
note: required by a bound in `Option::<T>::or_else`
--> $SRC_DIR/core/src/option.rs:LL:COL
- |
-LL | F: ~const FnOnce() -> Option<T>,
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Option::<T>::or_else`
+$SRC_DIR/core/src/option.rs:LL:COL
+$SRC_DIR/core/src/option.rs:LL:COL
+$SRC_DIR/core/src/option.rs:LL:COL
error: aborting due to previous error
| ^^
note: required by a bound in `spawn`
--> $SRC_DIR/std/src/thread/mod.rs:LL:COL
- |
-LL | F: Send + 'static,
- | ^^^^ required by this bound in `spawn`
+$SRC_DIR/std/src/thread/mod.rs:LL:COL
+$SRC_DIR/std/src/thread/mod.rs:LL:COL
+$SRC_DIR/std/src/thread/mod.rs:LL:COL
+$SRC_DIR/std/src/thread/mod.rs:LL:COL
error[E0277]: `Sender<()>` cannot be shared between threads safely
--> $DIR/closure-move-sync.rs:18:19
| ^^
note: required by a bound in `spawn`
--> $SRC_DIR/std/src/thread/mod.rs:LL:COL
- |
-LL | F: Send + 'static,
- | ^^^^ required by this bound in `spawn`
+$SRC_DIR/std/src/thread/mod.rs:LL:COL
+$SRC_DIR/std/src/thread/mod.rs:LL:COL
+$SRC_DIR/std/src/thread/mod.rs:LL:COL
+$SRC_DIR/std/src/thread/mod.rs:LL:COL
error: aborting due to 2 previous errors
= note: unsafe function cannot be called generically without an unsafe block
note: required by a bound in `Option::<T>::map`
--> $SRC_DIR/core/src/option.rs:LL:COL
- |
-LL | F: ~const FnOnce(T) -> U,
- | ^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Option::<T>::map`
+$SRC_DIR/core/src/option.rs:LL:COL
+$SRC_DIR/core/src/option.rs:LL:COL
+$SRC_DIR/core/src/option.rs:LL:COL
error: aborting due to previous error
|
LL | _func: F,
| ^
+ --> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
- ::: $SRC_DIR/core/src/ops/function.rs:LL:COL
- |
-LL | pub trait Fn<Args: Tuple>: FnMut<Args> {
- | -------------------------------------- similarly named trait `Fn` defined here
+ = note: similarly named trait `Fn` defined here
|
help: a trait with a similar name exists
|
|
note: tuple variant defined here
--> $SRC_DIR/core/src/result.rs:LL:COL
- |
-LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^
error[E0308]: mismatched types
--> $DIR/issue-87461.rs:17:8
|
note: tuple variant defined here
--> $SRC_DIR/core/src/result.rs:LL:COL
- |
-LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^
error[E0308]: mismatched types
--> $DIR/issue-87461.rs:26:12
|
note: tuple variant defined here
--> $SRC_DIR/core/src/result.rs:LL:COL
- |
-LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^
error: aborting due to 3 previous errors
|
LL | type_ascribe!(2, n([u8; || 1]))
| ^ help: a trait with a similar name exists: `Fn`
+ --> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
- ::: $SRC_DIR/core/src/ops/function.rs:LL:COL
- |
-LL | pub trait Fn<Args: Tuple>: FnMut<Args> {
- | -------------------------------------- similarly named trait `Fn` defined here
+ = note: similarly named trait `Fn` defined here
error[E0308]: mismatched types
--> $DIR/issue-90871.rs:4:29
|
note: this function takes ownership of the receiver `self`, which moves `some_vec`
--> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
- |
-LL | fn into_iter(self) -> Self::IntoIter;
- | ^^^^
= note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider cloning the value if the performance cost is acceptable
|
= note: cannot satisfy `_: MaskElement`
note: required by a bound in `Mask::<T, LANES>::splat`
--> $SRC_DIR/core/src/../../portable-simd/crates/core_simd/src/masks.rs:LL:COL
- |
-LL | T: MaskElement,
- | ^^^^^^^^^^^ required by this bound in `Mask::<T, LANES>::splat`
help: consider giving `y` an explicit type, where the type for type parameter `T` is specified
|
LL | let y: Mask<_, LANES> = Mask::<_, _>::splat(false);
error[E0080]: evaluation of `Inline::<dyn std::fmt::Debug>::{constant#0}` failed
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
|
-LL | intrinsics::size_of::<T>()
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^ size_of called on unsized type `dyn Debug`
+ = note: size_of called on unsized type `dyn Debug`
|
note: inside `std::mem::size_of::<dyn Debug>`
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
- |
-LL | intrinsics::size_of::<T>()
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `Inline::<dyn Debug>::{constant#0}`
--> $DIR/issue-80742.rs:22:10
|
...
LL | let dst = Inline::<dyn Debug>::new(0);
| ^^^ function or associated item cannot be called on `Inline<dyn Debug>` due to unsatisfied trait bounds
+ --> $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
- ::: $SRC_DIR/core/src/fmt/mod.rs:LL:COL
- |
-LL | pub trait Debug {
- | --------------- doesn't satisfy `dyn Debug: Sized`
+ = note: doesn't satisfy `dyn Debug: Sized`
|
= note: the following trait bounds were not satisfied:
`dyn Debug: Sized`
error[E0080]: evaluation of `Inline::<dyn std::fmt::Debug>::{constant#0}` failed
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
|
-LL | intrinsics::size_of::<T>()
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^ size_of called on unsized type `dyn Debug`
+ = note: size_of called on unsized type `dyn Debug`
|
note: inside `std::mem::size_of::<dyn Debug>`
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
- |
-LL | intrinsics::size_of::<T>()
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `Inline::<dyn Debug>::{constant#0}`
--> $DIR/issue-80742.rs:14:10
|
LL | let _: u32 = 5i32.try_into::<32>().unwrap();
| ^^^^^^^^ expected 0 generic arguments
|
-note: associated function defined here, with 0 generic parameters
- --> $SRC_DIR/core/src/convert/mod.rs:LL:COL
- |
-LL | fn try_into(self) -> Result<T, Self::Error>;
- | ^^^^^^^^
help: consider moving this generic argument to the `TryInto` trait, which takes up to 1 argument
|
LL | let _: u32 = TryInto::<32>::try_into(5i32).unwrap();
| ^^^^ --- help: remove this generic argument
| |
| expected 1 generic argument
- |
-note: struct defined here, with 1 generic parameter: `T`
- --> $SRC_DIR/core/src/cell.rs:LL:COL
- |
-LL | pub struct Cell<T: ?Sized> {
- | ^^^^ -
error: aborting due to previous error
error[E0080]: could not evaluate static initializer
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
|
-LL | &*ptr::slice_from_raw_parts(data, len)
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dereferencing pointer failed: null pointer is a dangling pointer (it has no provenance)
+ = note: dereferencing pointer failed: null pointer is a dangling pointer (it has no provenance)
|
note: inside `std::slice::from_raw_parts::<'_, u32>`
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
- |
-LL | &*ptr::slice_from_raw_parts(data, len)
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `S0`
--> $DIR/forbidden_slices.rs:18:34
|
error[E0080]: could not evaluate static initializer
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
|
-LL | &*ptr::slice_from_raw_parts(data, len)
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dereferencing pointer failed: null pointer is a dangling pointer (it has no provenance)
+ = note: dereferencing pointer failed: null pointer is a dangling pointer (it has no provenance)
|
note: inside `std::slice::from_raw_parts::<'_, ()>`
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
- |
-LL | &*ptr::slice_from_raw_parts(data, len)
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `S1`
--> $DIR/forbidden_slices.rs:19:33
|
error[E0080]: could not evaluate static initializer
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
|
-LL | &*ptr::slice_from_raw_parts(data, len)
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dereferencing pointer failed: ALLOC_ID has size 4, so pointer to 8 bytes starting at offset 0 is out-of-bounds
+ = note: dereferencing pointer failed: ALLOC_ID has size 4, so pointer to 8 bytes starting at offset 0 is out-of-bounds
|
note: inside `std::slice::from_raw_parts::<'_, u32>`
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
- |
-LL | &*ptr::slice_from_raw_parts(data, len)
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `S2`
--> $DIR/forbidden_slices.rs:22:34
|
error[E0080]: could not evaluate static initializer
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
|
-LL | &*ptr::slice_from_raw_parts(data, len)
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dereferencing pointer failed: ALLOC_ID has size 8, so pointer to 8 bytes starting at offset 1 is out-of-bounds
+ = note: dereferencing pointer failed: ALLOC_ID has size 8, so pointer to 8 bytes starting at offset 1 is out-of-bounds
|
note: inside `std::slice::from_raw_parts::<'_, u64>`
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
- |
-LL | &*ptr::slice_from_raw_parts(data, len)
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `S8`
--> $DIR/forbidden_slices.rs:43:5
|
error[E0080]: could not evaluate static initializer
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
-LL | unsafe { intrinsics::ptr_offset_from_unsigned(self, origin) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds offset_from: null pointer is a dangling pointer (it has no provenance)
+ = note: out-of-bounds offset_from: null pointer is a dangling pointer (it has no provenance)
|
note: inside `ptr::const_ptr::<impl *const u32>::sub_ptr`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
- |
-LL | unsafe { intrinsics::ptr_offset_from_unsigned(self, origin) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `from_ptr_range::<'_, u32>`
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
- |
-LL | unsafe { from_raw_parts(range.start, range.end.sub_ptr(range.start)) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `R0`
--> $DIR/forbidden_slices.rs:46:34
|
error[E0080]: could not evaluate static initializer
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
-LL | assert!(0 < pointee_size && pointee_size <= isize::MAX as usize);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'assertion failed: 0 < pointee_size && pointee_size <= isize::MAX as usize', $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
+ = note: the evaluated program panicked at 'assertion failed: 0 < pointee_size && pointee_size <= isize::MAX as usize', $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
note: inside `ptr::const_ptr::<impl *const ()>::sub_ptr`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
- |
-LL | assert!(0 < pointee_size && pointee_size <= isize::MAX as usize);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `from_ptr_range::<'_, ()>`
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
- |
-LL | unsafe { from_raw_parts(range.start, range.end.sub_ptr(range.start)) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `R1`
--> $DIR/forbidden_slices.rs:47:33
|
error[E0080]: could not evaluate static initializer
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
-LL | unsafe { intrinsics::offset(self, count) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer arithmetic: ALLOC_ID has size 4, so pointer to 8 bytes starting at offset 0 is out-of-bounds
+ = note: out-of-bounds pointer arithmetic: ALLOC_ID has size 4, so pointer to 8 bytes starting at offset 0 is out-of-bounds
|
note: inside `ptr::const_ptr::<impl *const u32>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
- |
-LL | unsafe { intrinsics::offset(self, count) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `ptr::const_ptr::<impl *const u32>::add`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
- |
-LL | unsafe { self.offset(count as isize) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `R2`
--> $DIR/forbidden_slices.rs:50:25
|
error[E0080]: could not evaluate static initializer
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
-LL | unsafe { intrinsics::offset(self, count) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer arithmetic: ALLOC_ID has size 8, so pointer to 8 bytes starting at offset 1 is out-of-bounds
+ = note: out-of-bounds pointer arithmetic: ALLOC_ID has size 8, so pointer to 8 bytes starting at offset 1 is out-of-bounds
|
note: inside `ptr::const_ptr::<impl *const u64>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
- |
-LL | unsafe { intrinsics::offset(self, count) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `ptr::const_ptr::<impl *const u64>::add`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
- |
-LL | unsafe { self.offset(count as isize) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `R8`
--> $DIR/forbidden_slices.rs:74:25
|
error[E0080]: could not evaluate static initializer
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
-LL | unsafe { intrinsics::ptr_offset_from_unsigned(self, origin) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ptr_offset_from_unsigned` called on pointers into different allocations
+ = note: `ptr_offset_from_unsigned` called on pointers into different allocations
|
note: inside `ptr::const_ptr::<impl *const u32>::sub_ptr`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
- |
-LL | unsafe { intrinsics::ptr_offset_from_unsigned(self, origin) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `from_ptr_range::<'_, u32>`
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
- |
-LL | unsafe { from_raw_parts(range.start, range.end.sub_ptr(range.start)) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `R9`
--> $DIR/forbidden_slices.rs:79:34
|
error[E0080]: could not evaluate static initializer
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
-LL | unsafe { intrinsics::ptr_offset_from_unsigned(self, origin) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ptr_offset_from_unsigned` called on pointers into different allocations
+ = note: `ptr_offset_from_unsigned` called on pointers into different allocations
|
note: inside `ptr::const_ptr::<impl *const u32>::sub_ptr`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
- |
-LL | unsafe { intrinsics::ptr_offset_from_unsigned(self, origin) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `from_ptr_range::<'_, u32>`
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
- |
-LL | unsafe { from_raw_parts(range.start, range.end.sub_ptr(range.start)) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `R10`
--> $DIR/forbidden_slices.rs:80:35
|
error[E0080]: could not evaluate static initializer
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
|
-LL | &*ptr::slice_from_raw_parts(data, len)
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dereferencing pointer failed: null pointer is a dangling pointer (it has no provenance)
+ = note: dereferencing pointer failed: null pointer is a dangling pointer (it has no provenance)
|
note: inside `std::slice::from_raw_parts::<'_, u32>`
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
- |
-LL | &*ptr::slice_from_raw_parts(data, len)
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `S0`
--> $DIR/forbidden_slices.rs:18:34
|
error[E0080]: could not evaluate static initializer
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
|
-LL | &*ptr::slice_from_raw_parts(data, len)
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dereferencing pointer failed: null pointer is a dangling pointer (it has no provenance)
+ = note: dereferencing pointer failed: null pointer is a dangling pointer (it has no provenance)
|
note: inside `std::slice::from_raw_parts::<'_, ()>`
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
- |
-LL | &*ptr::slice_from_raw_parts(data, len)
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `S1`
--> $DIR/forbidden_slices.rs:19:33
|
error[E0080]: could not evaluate static initializer
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
|
-LL | &*ptr::slice_from_raw_parts(data, len)
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dereferencing pointer failed: ALLOC_ID has size 4, so pointer to 8 bytes starting at offset 0 is out-of-bounds
+ = note: dereferencing pointer failed: ALLOC_ID has size 4, so pointer to 8 bytes starting at offset 0 is out-of-bounds
|
note: inside `std::slice::from_raw_parts::<'_, u32>`
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
- |
-LL | &*ptr::slice_from_raw_parts(data, len)
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `S2`
--> $DIR/forbidden_slices.rs:22:34
|
error[E0080]: could not evaluate static initializer
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
|
-LL | &*ptr::slice_from_raw_parts(data, len)
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dereferencing pointer failed: ALLOC_ID has size 8, so pointer to 8 bytes starting at offset 1 is out-of-bounds
+ = note: dereferencing pointer failed: ALLOC_ID has size 8, so pointer to 8 bytes starting at offset 1 is out-of-bounds
|
note: inside `std::slice::from_raw_parts::<'_, u64>`
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
- |
-LL | &*ptr::slice_from_raw_parts(data, len)
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `S8`
--> $DIR/forbidden_slices.rs:43:5
|
error[E0080]: could not evaluate static initializer
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
-LL | unsafe { intrinsics::ptr_offset_from_unsigned(self, origin) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds offset_from: null pointer is a dangling pointer (it has no provenance)
+ = note: out-of-bounds offset_from: null pointer is a dangling pointer (it has no provenance)
|
note: inside `ptr::const_ptr::<impl *const u32>::sub_ptr`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
- |
-LL | unsafe { intrinsics::ptr_offset_from_unsigned(self, origin) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `from_ptr_range::<'_, u32>`
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
- |
-LL | unsafe { from_raw_parts(range.start, range.end.sub_ptr(range.start)) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `R0`
--> $DIR/forbidden_slices.rs:46:34
|
error[E0080]: could not evaluate static initializer
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
-LL | assert!(0 < pointee_size && pointee_size <= isize::MAX as usize);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'assertion failed: 0 < pointee_size && pointee_size <= isize::MAX as usize', $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
+ = note: the evaluated program panicked at 'assertion failed: 0 < pointee_size && pointee_size <= isize::MAX as usize', $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
note: inside `ptr::const_ptr::<impl *const ()>::sub_ptr`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
- |
-LL | assert!(0 < pointee_size && pointee_size <= isize::MAX as usize);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `from_ptr_range::<'_, ()>`
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
- |
-LL | unsafe { from_raw_parts(range.start, range.end.sub_ptr(range.start)) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `R1`
--> $DIR/forbidden_slices.rs:47:33
|
error[E0080]: could not evaluate static initializer
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
-LL | unsafe { intrinsics::offset(self, count) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer arithmetic: ALLOC_ID has size 4, so pointer to 8 bytes starting at offset 0 is out-of-bounds
+ = note: out-of-bounds pointer arithmetic: ALLOC_ID has size 4, so pointer to 8 bytes starting at offset 0 is out-of-bounds
|
note: inside `ptr::const_ptr::<impl *const u32>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
- |
-LL | unsafe { intrinsics::offset(self, count) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `ptr::const_ptr::<impl *const u32>::add`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
- |
-LL | unsafe { self.offset(count as isize) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `R2`
--> $DIR/forbidden_slices.rs:50:25
|
error[E0080]: could not evaluate static initializer
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
-LL | unsafe { intrinsics::offset(self, count) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer arithmetic: ALLOC_ID has size 8, so pointer to 8 bytes starting at offset 1 is out-of-bounds
+ = note: out-of-bounds pointer arithmetic: ALLOC_ID has size 8, so pointer to 8 bytes starting at offset 1 is out-of-bounds
|
note: inside `ptr::const_ptr::<impl *const u64>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
- |
-LL | unsafe { intrinsics::offset(self, count) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `ptr::const_ptr::<impl *const u64>::add`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
- |
-LL | unsafe { self.offset(count as isize) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `R8`
--> $DIR/forbidden_slices.rs:74:25
|
error[E0080]: could not evaluate static initializer
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
-LL | unsafe { intrinsics::ptr_offset_from_unsigned(self, origin) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ptr_offset_from_unsigned` called on pointers into different allocations
+ = note: `ptr_offset_from_unsigned` called on pointers into different allocations
|
note: inside `ptr::const_ptr::<impl *const u32>::sub_ptr`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
- |
-LL | unsafe { intrinsics::ptr_offset_from_unsigned(self, origin) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `from_ptr_range::<'_, u32>`
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
- |
-LL | unsafe { from_raw_parts(range.start, range.end.sub_ptr(range.start)) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `R9`
--> $DIR/forbidden_slices.rs:79:34
|
error[E0080]: could not evaluate static initializer
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
-LL | unsafe { intrinsics::ptr_offset_from_unsigned(self, origin) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ptr_offset_from_unsigned` called on pointers into different allocations
+ = note: `ptr_offset_from_unsigned` called on pointers into different allocations
|
note: inside `ptr::const_ptr::<impl *const u32>::sub_ptr`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
- |
-LL | unsafe { intrinsics::ptr_offset_from_unsigned(self, origin) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `from_ptr_range::<'_, u32>`
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
- |
-LL | unsafe { from_raw_parts(range.start, range.end.sub_ptr(range.start)) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `R10`
--> $DIR/forbidden_slices.rs:80:35
|
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
|
-LL | copy_nonoverlapping(src, tmp.as_mut_ptr(), 1);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: alloc5 has size 4, so pointer to 4 bytes starting at offset 4 is out-of-bounds
+ = note: memory access failed: alloc5 has size 4, so pointer to 4 bytes starting at offset 4 is out-of-bounds
|
note: inside `std::ptr::read::<u32>`
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
- |
-LL | copy_nonoverlapping(src, tmp.as_mut_ptr(), 1);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `_READ`
--> $DIR/out_of_bounds_read.rs:12:33
|
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
|
-LL | copy_nonoverlapping(src, tmp.as_mut_ptr(), 1);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: alloc5 has size 4, so pointer to 4 bytes starting at offset 4 is out-of-bounds
+ = note: memory access failed: alloc5 has size 4, so pointer to 4 bytes starting at offset 4 is out-of-bounds
|
note: inside `std::ptr::read::<u32>`
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
- |
-LL | copy_nonoverlapping(src, tmp.as_mut_ptr(), 1);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `ptr::const_ptr::<impl *const u32>::read`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
- |
-LL | unsafe { read(self) }
- | ^^^^^^^^^^
note: inside `_CONST_READ`
--> $DIR/out_of_bounds_read.rs:13:39
|
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
|
-LL | copy_nonoverlapping(src, tmp.as_mut_ptr(), 1);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: alloc5 has size 4, so pointer to 4 bytes starting at offset 4 is out-of-bounds
+ = note: memory access failed: alloc5 has size 4, so pointer to 4 bytes starting at offset 4 is out-of-bounds
|
note: inside `std::ptr::read::<u32>`
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
- |
-LL | copy_nonoverlapping(src, tmp.as_mut_ptr(), 1);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `ptr::mut_ptr::<impl *mut u32>::read`
--> $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
- |
-LL | unsafe { read(self) }
- | ^^^^^^^^^^
note: inside `_MUT_READ`
--> $DIR/out_of_bounds_read.rs:14:37
|
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/num/f32.rs:LL:COL
|
-LL | panic!("const-eval error: cannot use f32::to_bits on a NaN")
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'const-eval error: cannot use f32::to_bits on a NaN', $SRC_DIR/core/src/num/f32.rs:LL:COL
+ = note: the evaluated program panicked at 'const-eval error: cannot use f32::to_bits on a NaN', $SRC_DIR/core/src/num/f32.rs:LL:COL
|
note: inside `core::f32::<impl f32>::to_bits::ct_f32_to_u32`
--> $SRC_DIR/core/src/num/f32.rs:LL:COL
- |
-LL | panic!("const-eval error: cannot use f32::to_bits on a NaN")
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `core::f32::<impl f32>::to_bits`
--> $SRC_DIR/core/src/num/f32.rs:LL:COL
- |
-LL | unsafe { intrinsics::const_eval_select((self,), ct_f32_to_u32, rt_f32_to_u32) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `f32::MASKED_NAN1`
--> $DIR/const-float-bits-reject-conv.rs:28:30
|
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/num/f32.rs:LL:COL
|
-LL | panic!("const-eval error: cannot use f32::to_bits on a NaN")
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'const-eval error: cannot use f32::to_bits on a NaN', $SRC_DIR/core/src/num/f32.rs:LL:COL
+ = note: the evaluated program panicked at 'const-eval error: cannot use f32::to_bits on a NaN', $SRC_DIR/core/src/num/f32.rs:LL:COL
|
note: inside `core::f32::<impl f32>::to_bits::ct_f32_to_u32`
--> $SRC_DIR/core/src/num/f32.rs:LL:COL
- |
-LL | panic!("const-eval error: cannot use f32::to_bits on a NaN")
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `core::f32::<impl f32>::to_bits`
--> $SRC_DIR/core/src/num/f32.rs:LL:COL
- |
-LL | unsafe { intrinsics::const_eval_select((self,), ct_f32_to_u32, rt_f32_to_u32) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `f32::MASKED_NAN2`
--> $DIR/const-float-bits-reject-conv.rs:30:30
|
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/num/f64.rs:LL:COL
|
-LL | panic!("const-eval error: cannot use f64::to_bits on a NaN")
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'const-eval error: cannot use f64::to_bits on a NaN', $SRC_DIR/core/src/num/f64.rs:LL:COL
+ = note: the evaluated program panicked at 'const-eval error: cannot use f64::to_bits on a NaN', $SRC_DIR/core/src/num/f64.rs:LL:COL
|
note: inside `core::f64::<impl f64>::to_bits::ct_f64_to_u64`
--> $SRC_DIR/core/src/num/f64.rs:LL:COL
- |
-LL | panic!("const-eval error: cannot use f64::to_bits on a NaN")
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `core::f64::<impl f64>::to_bits`
--> $SRC_DIR/core/src/num/f64.rs:LL:COL
- |
-LL | unsafe { intrinsics::const_eval_select((self,), ct_f64_to_u64, rt_f64_to_u64) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `f64::MASKED_NAN1`
--> $DIR/const-float-bits-reject-conv.rs:50:30
|
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/num/f64.rs:LL:COL
|
-LL | panic!("const-eval error: cannot use f64::to_bits on a NaN")
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'const-eval error: cannot use f64::to_bits on a NaN', $SRC_DIR/core/src/num/f64.rs:LL:COL
+ = note: the evaluated program panicked at 'const-eval error: cannot use f64::to_bits on a NaN', $SRC_DIR/core/src/num/f64.rs:LL:COL
|
note: inside `core::f64::<impl f64>::to_bits::ct_f64_to_u64`
--> $SRC_DIR/core/src/num/f64.rs:LL:COL
- |
-LL | panic!("const-eval error: cannot use f64::to_bits on a NaN")
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `core::f64::<impl f64>::to_bits`
--> $SRC_DIR/core/src/num/f64.rs:LL:COL
- |
-LL | unsafe { intrinsics::const_eval_select((self,), ct_f64_to_u64, rt_f64_to_u64) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `f64::MASKED_NAN2`
--> $DIR/const-float-bits-reject-conv.rs:52:30
|
|
note: impl defined here, but it is not `const`
--> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
- |
-LL | impl<I: Iterator> const IntoIterator for I {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
error[E0658]: mutable references are not allowed in constant functions
|
note: impl defined here, but it is not `const`
--> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
- |
-LL | impl<I: Iterator> const IntoIterator for I {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: calls in constants are limited to constant functions, tuple structs and tuple variants
error[E0015]: cannot call non-const fn `<std::ops::Range<i32> as Iterator>::next` in constants
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/hint.rs:LL:COL
|
-LL | intrinsics::unreachable()
- | ^^^^^^^^^^^^^^^^^^^^^^^^^ entering unreachable code
+ = note: entering unreachable code
|
note: inside `unreachable_unchecked`
--> $SRC_DIR/core/src/hint.rs:LL:COL
- |
-LL | intrinsics::unreachable()
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `foo`
--> $DIR/const_unsafe_unreachable_ub.rs:6:18
|
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
|
-LL | copy_nonoverlapping(src, tmp.as_mut_ptr(), 1);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ accessing memory with alignment 1, but alignment 4 is required
+ = note: accessing memory with alignment 1, but alignment 4 is required
|
note: inside `std::ptr::read::<u32>`
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
- |
-LL | copy_nonoverlapping(src, tmp.as_mut_ptr(), 1);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `ptr::const_ptr::<impl *const u32>::read`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
- |
-LL | unsafe { read(self) }
- | ^^^^^^^^^^
note: inside `INNER`
--> $DIR/detect-extra-ub.rs:38:9
|
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
|
-LL | copy_nonoverlapping(src, tmp.as_mut_ptr(), 1);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to copy parts of a pointer from memory at ALLOC
+ = note: unable to copy parts of a pointer from memory at ALLOC
|
= help: this code performed an operation that depends on the underlying bytes representing a pointer
= help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
note: inside `std::ptr::read::<u8>`
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
- |
-LL | copy_nonoverlapping(src, tmp.as_mut_ptr(), 1);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `ptr::const_ptr::<impl *const u8>::read`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
- |
-LL | unsafe { read(self) }
- | ^^^^^^^^^^
note: inside `C`
--> $DIR/issue-miri-1910.rs:8:5
|
error[E0080]: evaluation of `<std::string::String as Bar<std::vec::Vec<u32>, std::string::String>>::F` failed
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
|
-LL | pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ calling non-const function `<Vec<u32> as Drop>::drop`
+ = note: calling non-const function `<Vec<u32> as Drop>::drop`
|
note: inside `std::ptr::drop_in_place::<Vec<u32>> - shim(Some(Vec<u32>))`
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
- |
-LL | pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `std::ptr::drop_in_place::<(Vec<u32>, u32)> - shim(Some((Vec<u32>, u32)))`
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
- |
-LL | pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `<String as Bar<Vec<u32>, String>>::F`
--> $DIR/assoc_const.rs:12:31
|
error[E0080]: could not evaluate static initializer
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
|
-LL | pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ calling non-const function `<Vec<i32> as Drop>::drop`
+ = note: calling non-const function `<Vec<i32> as Drop>::drop`
|
note: inside `std::ptr::drop_in_place::<Vec<i32>> - shim(Some(Vec<i32>))`
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
- |
-LL | pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `TEST_BAD`
--> $DIR/drop.rs:17:1
|
-// compile-flags: -Z simulate-remapped-rust-src-base=/rustc/FAKE_PREFIX -Z translate-remapped-path-to-local-path=no -Z ui-testing=no
+// compile-flags: -Z ui-testing=no
// normalize-stderr-test "alloc[0-9]+" -> "ALLOC_ID"
#![feature(const_swap)]
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
-LL | unsafe { intrinsics::ptr_offset_from(self, origin) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ptr_offset_from` called on pointers into different allocations
+ = note: `ptr_offset_from` called on pointers into different allocations
|
note: inside `ptr::const_ptr::<impl *const u8>::offset_from`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
- |
-LL | unsafe { intrinsics::ptr_offset_from(self, origin) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `NOT_PTR`
--> $DIR/offset_from_ub.rs:24:14
|
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
-LL | unsafe { intrinsics::ptr_offset_from(self, origin) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds offset_from: null pointer is a dangling pointer (it has no provenance)
+ = note: out-of-bounds offset_from: null pointer is a dangling pointer (it has no provenance)
|
note: inside `ptr::const_ptr::<impl *const u8>::offset_from`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
- |
-LL | unsafe { intrinsics::ptr_offset_from(self, origin) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `OFFSET_VERY_FAR1`
--> $DIR/offset_from_ub.rs:115:14
|
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
-LL | unsafe { intrinsics::ptr_offset_from(self, origin) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds offset_from: null pointer is a dangling pointer (it has no provenance)
+ = note: out-of-bounds offset_from: null pointer is a dangling pointer (it has no provenance)
|
note: inside `ptr::const_ptr::<impl *const u8>::offset_from`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
- |
-LL | unsafe { intrinsics::ptr_offset_from(self, origin) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `OFFSET_VERY_FAR2`
--> $DIR/offset_from_ub.rs:121:14
|
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
-LL | unsafe { intrinsics::offset(self, count) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing in-bounds pointer arithmetic
+ = note: overflowing in-bounds pointer arithmetic
|
note: inside `ptr::const_ptr::<impl *const u8>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
- |
-LL | unsafe { intrinsics::offset(self, count) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `BEFORE_START`
--> $DIR/offset_ub.rs:7:46
|
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
-LL | unsafe { intrinsics::offset(self, count) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer arithmetic: allocN has size 1, so pointer to 2 bytes starting at offset 0 is out-of-bounds
+ = note: out-of-bounds pointer arithmetic: allocN has size 1, so pointer to 2 bytes starting at offset 0 is out-of-bounds
|
note: inside `ptr::const_ptr::<impl *const u8>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
- |
-LL | unsafe { intrinsics::offset(self, count) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `AFTER_END`
--> $DIR/offset_ub.rs:8:43
|
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
-LL | unsafe { intrinsics::offset(self, count) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer arithmetic: allocN has size 100, so pointer to 101 bytes starting at offset 0 is out-of-bounds
+ = note: out-of-bounds pointer arithmetic: allocN has size 100, so pointer to 101 bytes starting at offset 0 is out-of-bounds
|
note: inside `ptr::const_ptr::<impl *const u8>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
- |
-LL | unsafe { intrinsics::offset(self, count) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `AFTER_ARRAY`
--> $DIR/offset_ub.rs:9:45
|
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
-LL | unsafe { intrinsics::offset(self, count) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing in-bounds pointer arithmetic
+ = note: overflowing in-bounds pointer arithmetic
|
note: inside `ptr::const_ptr::<impl *const u16>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
- |
-LL | unsafe { intrinsics::offset(self, count) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `OVERFLOW`
--> $DIR/offset_ub.rs:11:43
|
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
-LL | unsafe { intrinsics::offset(self, count) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing in-bounds pointer arithmetic
+ = note: overflowing in-bounds pointer arithmetic
|
note: inside `ptr::const_ptr::<impl *const u16>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
- |
-LL | unsafe { intrinsics::offset(self, count) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `UNDERFLOW`
--> $DIR/offset_ub.rs:12:44
|
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
-LL | unsafe { intrinsics::offset(self, count) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing in-bounds pointer arithmetic
+ = note: overflowing in-bounds pointer arithmetic
|
note: inside `ptr::const_ptr::<impl *const u8>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
- |
-LL | unsafe { intrinsics::offset(self, count) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `OVERFLOW_ADDRESS_SPACE`
--> $DIR/offset_ub.rs:13:56
|
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
-LL | unsafe { intrinsics::offset(self, count) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing in-bounds pointer arithmetic
+ = note: overflowing in-bounds pointer arithmetic
|
note: inside `ptr::const_ptr::<impl *const u8>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
- |
-LL | unsafe { intrinsics::offset(self, count) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `UNDERFLOW_ADDRESS_SPACE`
--> $DIR/offset_ub.rs:14:57
|
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
-LL | unsafe { intrinsics::offset(self, count) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer arithmetic: allocN has size 1, so pointer to 2 bytes starting at offset -4 is out-of-bounds
+ = note: out-of-bounds pointer arithmetic: allocN has size 1, so pointer to 2 bytes starting at offset -4 is out-of-bounds
|
note: inside `ptr::const_ptr::<impl *const u8>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
- |
-LL | unsafe { intrinsics::offset(self, count) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `NEGATIVE_OFFSET`
--> $DIR/offset_ub.rs:15:49
|
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
-LL | unsafe { intrinsics::offset(self, count) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer arithmetic: allocN has size 0, so pointer to 1 byte starting at offset 0 is out-of-bounds
+ = note: out-of-bounds pointer arithmetic: allocN has size 0, so pointer to 1 byte starting at offset 0 is out-of-bounds
|
note: inside `ptr::const_ptr::<impl *const u8>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
- |
-LL | unsafe { intrinsics::offset(self, count) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `ZERO_SIZED_ALLOC`
--> $DIR/offset_ub.rs:17:50
|
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
|
-LL | unsafe { intrinsics::offset(self, count) as *mut T }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer arithmetic: 0x1[noalloc] is a dangling pointer (it has no provenance)
+ = note: out-of-bounds pointer arithmetic: 0x1[noalloc] is a dangling pointer (it has no provenance)
|
note: inside `ptr::mut_ptr::<impl *mut u8>::offset`
--> $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
- |
-LL | unsafe { intrinsics::offset(self, count) as *mut T }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `DANGLING`
--> $DIR/offset_ub.rs:18:42
|
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
-LL | unsafe { intrinsics::offset(self, count) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer arithmetic: null pointer is a dangling pointer (it has no provenance)
+ = note: out-of-bounds pointer arithmetic: null pointer is a dangling pointer (it has no provenance)
|
note: inside `ptr::const_ptr::<impl *const u8>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
- |
-LL | unsafe { intrinsics::offset(self, count) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `NULL_OFFSET_ZERO`
--> $DIR/offset_ub.rs:21:50
|
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
-LL | unsafe { intrinsics::offset(self, count) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer arithmetic: 0x7f..f[noalloc] is a dangling pointer (it has no provenance)
+ = note: out-of-bounds pointer arithmetic: 0x7f..f[noalloc] is a dangling pointer (it has no provenance)
|
note: inside `ptr::const_ptr::<impl *const u8>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
- |
-LL | unsafe { intrinsics::offset(self, count) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `UNDERFLOW_ABS`
--> $DIR/offset_ub.rs:24:47
|
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
-LL | unsafe { intrinsics::offset(self, count) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer arithmetic: alloc3 has size $WORD, so pointer to $TWO_WORDS bytes starting at offset 0 is out-of-bounds
+ = note: out-of-bounds pointer arithmetic: alloc3 has size $WORD, so pointer to $TWO_WORDS bytes starting at offset 0 is out-of-bounds
|
note: inside `ptr::const_ptr::<impl *const usize>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
- |
-LL | unsafe { intrinsics::offset(self, count) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `_`
--> $DIR/ptr_comparisons.rs:50:34
|
|
note: required by a bound in `AssertParamIsEq`
--> $SRC_DIR/core/src/cmp.rs:LL:COL
- |
-LL | pub struct AssertParamIsEq<T: Eq + ?Sized> {
- | ^^ required by this bound in `AssertParamIsEq`
= note: this error originates in the derive macro `Eq` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider annotating `Error` with `#[derive(Eq)]`
|
|
note: required by a bound in `AssertParamIsEq`
--> $SRC_DIR/core/src/cmp.rs:LL:COL
- |
-LL | pub struct AssertParamIsEq<T: Eq + ?Sized> {
- | ^^ required by this bound in `AssertParamIsEq`
= note: this error originates in the derive macro `Eq` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider annotating `Error` with `#[derive(Eq)]`
|
|
note: required by a bound in `AssertParamIsEq`
--> $SRC_DIR/core/src/cmp.rs:LL:COL
- |
-LL | pub struct AssertParamIsEq<T: Eq + ?Sized> {
- | ^^ required by this bound in `AssertParamIsEq`
= note: this error originates in the derive macro `Eq` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider annotating `Error` with `#[derive(Eq)]`
|
|
note: required by a bound in `AssertParamIsEq`
--> $SRC_DIR/core/src/cmp.rs:LL:COL
- |
-LL | pub struct AssertParamIsEq<T: Eq + ?Sized> {
- | ^^ required by this bound in `AssertParamIsEq`
= note: this error originates in the derive macro `Eq` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider annotating `Error` with `#[derive(Eq)]`
|
|
LL | #[derive(Eqr)]
| ^^^ help: a derive macro with a similar name exists: `Eq`
+ --> $SRC_DIR/core/src/cmp.rs:LL:COL
|
- ::: $SRC_DIR/core/src/cmp.rs:LL:COL
- |
-LL | pub macro Eq($item:item) {
- | ------------ similarly named derive macro `Eq` defined here
+ = note: similarly named derive macro `Eq` defined here
error: cannot find derive macro `Eqr` in this scope
--> $DIR/deriving-meta-unknown-trait.rs:1:10
|
LL | #[derive(Eqr)]
| ^^^ help: a derive macro with a similar name exists: `Eq`
+ --> $SRC_DIR/core/src/cmp.rs:LL:COL
|
- ::: $SRC_DIR/core/src/cmp.rs:LL:COL
- |
-LL | pub macro Eq($item:item) {
- | ------------ similarly named derive macro `Eq` defined here
+ = note: similarly named derive macro `Eq` defined here
error: aborting due to 2 previous errors
= note: required for `Option<f64>` to implement `Eq`
note: required by a bound in `AssertParamIsEq`
--> $SRC_DIR/core/src/cmp.rs:LL:COL
- |
-LL | pub struct AssertParamIsEq<T: Eq + ?Sized> {
- | ^^ required by this bound in `AssertParamIsEq`
= note: this error originates in the derive macro `Eq` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to previous error
| ^^^^^^^^ must implement `AddAssign<_>`
note: the following trait must be implemented
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
- |
-LL | pub trait AddAssign<Rhs = Self> {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0067]: invalid left-hand side of assignment
--> $DIR/note-unsupported.rs:17:22
= help: the trait `Sized` is not implemented for `str`
note: required by a bound in `Box::<T>::new`
--> $SRC_DIR/alloc/src/boxed.rs:LL:COL
- |
-LL | impl<T> Box<T> {
- | ^ required by this bound in `Box::<T>::new`
error[E0277]: the size for values of type `[isize]` cannot be known at compilation time
--> $DIR/dst-rvalue.rs:8:37
= help: the trait `Sized` is not implemented for `[isize]`
note: required by a bound in `Box::<T>::new`
--> $SRC_DIR/alloc/src/boxed.rs:LL:COL
- |
-LL | impl<T> Box<T> {
- | ^ required by this bound in `Box::<T>::new`
error: aborting due to 2 previous errors
note: `Option<i32>` defined here
--> $SRC_DIR/core/src/option.rs:LL:COL
|
-LL | pub enum Option<T> {
- | ------------------
-...
-LL | None,
- | ^^^^ not covered
-...
-LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^^^ not covered
+ = note:
+$SRC_DIR/core/src/option.rs:LL:COL: not covered
+$SRC_DIR/core/src/option.rs:LL:COL: not covered
= note: the matched value is of type `Option<i32>`
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
|
note: `Option<i32>` defined here
--> $SRC_DIR/core/src/option.rs:LL:COL
|
-LL | pub enum Option<T> {
- | ------------------
-...
-LL | None,
- | ^^^^ not covered
+ = note:
+$SRC_DIR/core/src/option.rs:LL:COL: not covered
= note: the matched value is of type `Option<i32>`
help: you might want to use `if let` to ignore the variant that isn't matched
|
|
note: required by a bound in `Fn`
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
- |
-LL | pub trait Fn<Args: Tuple>: FnMut<Args> {
- | ^^^^^ required by this bound in `Fn`
error: aborting due to previous error
note: `Option<i32>` defined here
--> $SRC_DIR/core/src/option.rs:LL:COL
|
-LL | pub enum Option<T> {
- | ------------------
-...
-LL | None,
- | ^^^^ not covered
+ = note:
+$SRC_DIR/core/src/option.rs:LL:COL: not covered
= note: the matched value is of type `Option<i32>`
error: aborting due to previous error
| ^^^^^^^^^^^^^ must implement `Not`
note: the following trait must be implemented
--> $SRC_DIR/core/src/ops/bit.rs:LL:COL
- |
-LL | pub trait Not {
- | ^^^^^^^^^^^^^
error[E0604]: only `u8` can be cast as `char`, not `u32`
--> $DIR/error-festival.rs:25:5
= help: the trait `FnOnce<({integer},)>` is not implemented for `Option<_>`
note: required by a bound in `Option::<T>::and_then`
--> $SRC_DIR/core/src/option.rs:LL:COL
- |
-LL | F: ~const FnOnce(T) -> Option<U>,
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Option::<T>::and_then`
+$SRC_DIR/core/src/option.rs:LL:COL
+$SRC_DIR/core/src/option.rs:LL:COL
+$SRC_DIR/core/src/option.rs:LL:COL
error: aborting due to 2 previous errors
note: `Result<u32, !>` defined here
--> $SRC_DIR/core/src/result.rs:LL:COL
|
-LL | pub enum Result<T, E> {
- | ---------------------
-...
-LL | Err(#[stable(feature = "rust1", since = "1.0.0")] E),
- | ^^^ not covered
+ = note:
+$SRC_DIR/core/src/result.rs:LL:COL: not covered
= note: the matched value is of type `Result<u32, !>`
help: you might want to use `if let` to ignore the variant that isn't matched
|
found reference `&{float}`
note: associated function defined here
--> $SRC_DIR/core/src/fmt/mod.rs:LL:COL
- |
-LL | pub fn from_usize(x: &usize) -> ArgumentV1<'_> {
- | ^^^^^^^^^^
= note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0308]: mismatched types
found reference `&{float}`
note: associated function defined here
--> $SRC_DIR/core/src/fmt/mod.rs:LL:COL
- |
-LL | pub fn from_usize(x: &usize) -> ArgumentV1<'_> {
- | ^^^^^^^^^^
= note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 38 previous errors
= note: required for `&str` to implement `UpperHex`
note: required by a bound in `ArgumentV1::<'a>::new_upper_hex`
--> $SRC_DIR/core/src/fmt/mod.rs:LL:COL
- |
-LL | arg_new!(new_upper_hex, UpperHex);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `ArgumentV1::<'a>::new_upper_hex`
= note: this error originates in the macro `$crate::__export::format_args` which comes from the expansion of the macro `arg_new` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to previous error
|
note: associated function defined here
--> $SRC_DIR/core/src/ops/generator.rs:LL:COL
- |
-LL | fn resume(self: Pin<&mut Self>, arg: R) -> GeneratorState<Self::Yield, Self::Return>;
- | ^^^^^^
help: provide the argument
|
LL | Pin::new(&mut b).resume(());
= help: the trait `Sized` is not implemented for `str`
note: required by a bound in `GeneratorState`
--> $SRC_DIR/core/src/ops/generator.rs:LL:COL
- |
-LL | pub enum GeneratorState<Y, R> {
- | ^ required by this bound in `GeneratorState`
error: aborting due to 2 previous errors
LL | type A = HashMap;
| ^^^^^^^ expected at least 2 generic arguments
|
-note: struct defined here, with at least 2 generic parameters: `K`, `V`
- --> $SRC_DIR/std/src/collections/hash/map.rs:LL:COL
- |
-LL | pub struct HashMap<K, V, S = RandomState> {
- | ^^^^^^^ - -
help: add missing generic arguments
|
LL | type A = HashMap<K, V>;
| |
| expected at least 2 generic arguments
|
-note: struct defined here, with at least 2 generic parameters: `K`, `V`
- --> $SRC_DIR/std/src/collections/hash/map.rs:LL:COL
- |
-LL | pub struct HashMap<K, V, S = RandomState> {
- | ^^^^^^^ - -
help: add missing generic argument
|
LL | type B = HashMap<String, V>;
| ^^^^^^^--------- help: remove these generics
| |
| expected 0 lifetime arguments
- |
-note: struct defined here, with 0 lifetime parameters
- --> $SRC_DIR/std/src/collections/hash/map.rs:LL:COL
- |
-LL | pub struct HashMap<K, V, S = RandomState> {
- | ^^^^^^^
error[E0107]: this struct takes at least 2 generic arguments but 0 generic arguments were supplied
--> $DIR/wrong-number-of-args.rs:318:18
LL | type C = HashMap<'static>;
| ^^^^^^^ expected at least 2 generic arguments
|
-note: struct defined here, with at least 2 generic parameters: `K`, `V`
- --> $SRC_DIR/std/src/collections/hash/map.rs:LL:COL
- |
-LL | pub struct HashMap<K, V, S = RandomState> {
- | ^^^^^^^ - -
help: add missing generic arguments
|
LL | type C = HashMap<'static, K, V>;
| ^^^^^^^ --- help: remove this generic argument
| |
| expected at most 3 generic arguments
- |
-note: struct defined here, with at most 3 generic parameters: `K`, `V`, `S`
- --> $SRC_DIR/std/src/collections/hash/map.rs:LL:COL
- |
-LL | pub struct HashMap<K, V, S = RandomState> {
- | ^^^^^^^ - - ---------------
error[E0107]: this struct takes at least 2 generic arguments but 0 generic arguments were supplied
--> $DIR/wrong-number-of-args.rs:328:18
LL | type E = HashMap<>;
| ^^^^^^^ expected at least 2 generic arguments
|
-note: struct defined here, with at least 2 generic parameters: `K`, `V`
- --> $SRC_DIR/std/src/collections/hash/map.rs:LL:COL
- |
-LL | pub struct HashMap<K, V, S = RandomState> {
- | ^^^^^^^ - -
help: add missing generic arguments
|
LL | type E = HashMap<K, V>;
LL | type A = Result;
| ^^^^^^ expected 2 generic arguments
|
-note: enum defined here, with 2 generic parameters: `T`, `E`
- --> $SRC_DIR/core/src/result.rs:LL:COL
- |
-LL | pub enum Result<T, E> {
- | ^^^^^^ - -
help: add missing generic arguments
|
LL | type A = Result<T, E>;
| |
| expected 2 generic arguments
|
-note: enum defined here, with 2 generic parameters: `T`, `E`
- --> $SRC_DIR/core/src/result.rs:LL:COL
- |
-LL | pub enum Result<T, E> {
- | ^^^^^^ - -
help: add missing generic argument
|
LL | type B = Result<String, E>;
| ^^^^^^--------- help: remove these generics
| |
| expected 0 lifetime arguments
- |
-note: enum defined here, with 0 lifetime parameters
- --> $SRC_DIR/core/src/result.rs:LL:COL
- |
-LL | pub enum Result<T, E> {
- | ^^^^^^
error[E0107]: this enum takes 2 generic arguments but 0 generic arguments were supplied
--> $DIR/wrong-number-of-args.rs:342:18
LL | type C = Result<'static>;
| ^^^^^^ expected 2 generic arguments
|
-note: enum defined here, with 2 generic parameters: `T`, `E`
- --> $SRC_DIR/core/src/result.rs:LL:COL
- |
-LL | pub enum Result<T, E> {
- | ^^^^^^ - -
help: add missing generic arguments
|
LL | type C = Result<'static, T, E>;
| ^^^^^^ ---- help: remove this generic argument
| |
| expected 2 generic arguments
- |
-note: enum defined here, with 2 generic parameters: `T`, `E`
- --> $SRC_DIR/core/src/result.rs:LL:COL
- |
-LL | pub enum Result<T, E> {
- | ^^^^^^ - -
error[E0107]: this enum takes 2 generic arguments but 0 generic arguments were supplied
--> $DIR/wrong-number-of-args.rs:352:18
LL | type E = Result<>;
| ^^^^^^ expected 2 generic arguments
|
-note: enum defined here, with 2 generic parameters: `T`, `E`
- --> $SRC_DIR/core/src/result.rs:LL:COL
- |
-LL | pub enum Result<T, E> {
- | ^^^^^^ - -
help: add missing generic arguments
|
LL | type E = Result<T, E>;
|
LL | fn hash(&self, hasher: &mut impl Hasher) {}
| ^^^^^^^^^^^ expected generic parameter, found `impl Trait`
+ --> $SRC_DIR/core/src/hash/mod.rs:LL:COL
|
- ::: $SRC_DIR/core/src/hash/mod.rs:LL:COL
- |
-LL | fn hash<H: Hasher>(&self, state: &mut H);
- | - declaration in trait here
+ = note: declaration in trait here
error: aborting due to 4 previous errors
= help: the trait `Sized` is not implemented for `[u8]`
note: required by a bound in `Vec`
--> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
- |
-LL | pub struct Vec<T, #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global> {
- | ^ required by this bound in `Vec`
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
--> $DIR/wf-bounds.rs:12:23
LL | fn f<T>(data: &[T]) -> impl Iterator<Item = Vec> {
| ^^^ expected at least 1 generic argument
|
-note: struct defined here, with at least 1 generic parameter: `T`
- --> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
- |
-LL | pub struct Vec<T, #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global> {
- | ^^^ -
help: add missing generic argument
|
LL | fn f<T>(data: &[T]) -> impl Iterator<Item = Vec<T>> {
...
LL | define_vec!();
| ------------- in this macro invocation
-note: `Vec` could also refer to the struct defined here
+note: `Vec` could also refer to a struct from prelude
--> $SRC_DIR/std/src/prelude/mod.rs:LL:COL
- |
-LL | pub use super::v1::*;
- | ^^^^^^^^^^^^
= note: this error originates in the macro `define_vec` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 2 previous errors
where T: ?Sized;
note: required by a bound in `HashMap::<K, V, S>::get`
--> $SRC_DIR/std/src/collections/hash/map.rs:LL:COL
- |
-LL | K: Borrow<Q>,
- | ^^^^^^^^^ required by this bound in `HashMap::<K, V, S>::get`
+$SRC_DIR/std/src/collections/hash/map.rs:LL:COL
+$SRC_DIR/std/src/collections/hash/map.rs:LL:COL
+$SRC_DIR/std/src/collections/hash/map.rs:LL:COL
help: consider specifying the generic argument
|
LL | .get::<Q>(&"key".into())
| ^^
note: required by a bound in `catch_unwind`
--> $SRC_DIR/std/src/panic.rs:LL:COL
- |
-LL | pub fn catch_unwind<F: FnOnce() -> R + UnwindSafe, R>(f: F) -> Result<R> {
- | ^^^^^^^^^^ required by this bound in `catch_unwind`
error: aborting due to previous error
= note: wrap the `{integer}` in a closure with no arguments: `|| { /* code */ }`
note: required by a bound in `const_eval_select`
--> $SRC_DIR/core/src/intrinsics.rs:LL:COL
- |
-LL | F: FnOnce<ARG, Output = RET>;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `const_eval_select`
+$SRC_DIR/core/src/intrinsics.rs:LL:COL
+$SRC_DIR/core/src/intrinsics.rs:LL:COL
+$SRC_DIR/core/src/intrinsics.rs:LL:COL
+$SRC_DIR/core/src/intrinsics.rs:LL:COL
error: this argument must be a function item
--> $DIR/const-eval-select-bad.rs:10:31
= note: wrap the `{integer}` in a closure with no arguments: `|| { /* code */ }`
note: required by a bound in `const_eval_select`
--> $SRC_DIR/core/src/intrinsics.rs:LL:COL
- |
-LL | G: FnOnce<ARG, Output = RET>,
- | ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `const_eval_select`
+$SRC_DIR/core/src/intrinsics.rs:LL:COL
+$SRC_DIR/core/src/intrinsics.rs:LL:COL
+$SRC_DIR/core/src/intrinsics.rs:LL:COL
+$SRC_DIR/core/src/intrinsics.rs:LL:COL
error[E0271]: expected `fn(i32) -> bool {bar}` to be a fn item that returns `i32`, but it returns `bool`
--> $DIR/const-eval-select-bad.rs:32:34
|
note: required by a bound in `const_eval_select`
--> $SRC_DIR/core/src/intrinsics.rs:LL:COL
- |
-LL | G: FnOnce<ARG, Output = RET>,
- | ^^^^^^^^^^^^ required by this bound in `const_eval_select`
+$SRC_DIR/core/src/intrinsics.rs:LL:COL
+$SRC_DIR/core/src/intrinsics.rs:LL:COL
+$SRC_DIR/core/src/intrinsics.rs:LL:COL
+$SRC_DIR/core/src/intrinsics.rs:LL:COL
error[E0631]: type mismatch in function arguments
--> $DIR/const-eval-select-bad.rs:37:32
found function signature `fn(i32) -> _`
note: required by a bound in `const_eval_select`
--> $SRC_DIR/core/src/intrinsics.rs:LL:COL
- |
-LL | F: FnOnce<ARG, Output = RET>;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `const_eval_select`
+$SRC_DIR/core/src/intrinsics.rs:LL:COL
+$SRC_DIR/core/src/intrinsics.rs:LL:COL
+$SRC_DIR/core/src/intrinsics.rs:LL:COL
+$SRC_DIR/core/src/intrinsics.rs:LL:COL
error: this argument must be a `const fn`
--> $DIR/const-eval-select-bad.rs:42:29
| ^^^^^^^^^^^^^^^^^^ must implement `Not`
note: the following trait must be implemented
--> $SRC_DIR/core/src/ops/bit.rs:LL:COL
- |
-LL | pub trait Not {
- | ^^^^^^^^^^^^^
= note: this error originates in the macro `assert` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to previous error
LL | fn fn1(0: Box) {}
| ^^^ expected at least 1 generic argument
|
-note: struct defined here, with at least 1 generic parameter: `T`
- --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
- |
-LL | pub struct Box<
- | ^^^
-LL | T: ?Sized,
- | -
help: add missing generic argument
|
LL | fn fn1(0: Box<T>) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type of the type parameter `M` declared on the function `begin_panic`
|
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
-help: consider specifying the generic argument
- --> $SRC_DIR/std/src/panic.rs:LL:COL
- |
-LL | $crate::rt::begin_panic::<M>($msg)
- | +++++
error: aborting due to previous error
|
LL | fn new() -> NoResult<MyEnum, String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^
+ --> $SRC_DIR/core/src/result.rs:LL:COL
|
- ::: $SRC_DIR/core/src/result.rs:LL:COL
- |
-LL | pub enum Result<T, E> {
- | --------------------- similarly named enum `Result` defined here
+ = note: similarly named enum `Result` defined here
|
help: try using the variant's enum
|
|
LL | fn newer() -> NoResult<foo::MyEnum, String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ --> $SRC_DIR/core/src/result.rs:LL:COL
|
- ::: $SRC_DIR/core/src/result.rs:LL:COL
- |
-LL | pub enum Result<T, E> {
- | --------------------- similarly named enum `Result` defined here
+ = note: similarly named enum `Result` defined here
|
help: try using the variant's enum
|
= help: the trait `Sized` is not implemented for `[{integer}]`
note: required by a bound in `Box::<T>::new`
--> $SRC_DIR/alloc/src/boxed.rs:LL:COL
- |
-LL | impl<T> Box<T> {
- | ^ required by this bound in `Box::<T>::new`
error: aborting due to previous error
| ^^^ -- help: remove this lifetime argument
| |
| expected 0 lifetime arguments
- |
-note: struct defined here, with 0 lifetime parameters
- --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
- |
-LL | pub struct Box<
- | ^^^
error: aborting due to previous error
|
note: required by a bound in `slice::<impl [T]>::sort`
--> $SRC_DIR/alloc/src/slice.rs:LL:COL
- |
-LL | T: Ord,
- | ^^^ required by this bound in `slice::<impl [T]>::sort`
+$SRC_DIR/alloc/src/slice.rs:LL:COL
+$SRC_DIR/alloc/src/slice.rs:LL:COL
help: consider annotating `X` with `#[derive(Ord)]`
|
LL | #[derive(Ord)]
= help: the trait `Sized` is not implemented for `[i32]`
note: required by a bound in `Vec`
--> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
- |
-LL | pub struct Vec<T, #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global> {
- | ^ required by this bound in `Vec`
error: aborting due to previous error
LL | println!("{:?}",(vfnfer[0] as dyn Fn)(3));
| ^^ expected 1 generic argument
|
-note: trait defined here, with 1 generic parameter: `Args`
- --> $SRC_DIR/core/src/ops/function.rs:LL:COL
- |
-LL | pub trait Fn<Args: Tuple>: FnMut<Args> {
- | ^^ ----
help: add missing generic argument
|
LL | println!("{:?}",(vfnfer[0] as dyn Fn<Args>)(3));
= help: the trait `FnMut<(_, char)>` is not implemented for `()`
note: required by a bound in `fold`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
- |
-LL | F: FnMut(B, Self::Item) -> B,
- | ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Iterator::fold`
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error: aborting due to previous error
|
LL | None @ _ => {}
| ^^^^ cannot be named the same as a unit variant
+ --> $SRC_DIR/std/src/prelude/mod.rs:LL:COL
|
- ::: $SRC_DIR/std/src/prelude/mod.rs:LL:COL
- |
-LL | pub use super::v1::*;
- | ------------ the unit variant `None` is defined here
+ = note: the unit variant `None` is defined here
error[E0530]: match bindings cannot shadow constants
--> $DIR/issue-27033.rs:7:9
|
note: associated function defined here
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
- |
-LL | fn fold<B, F>(mut self, init: B, mut f: F) -> B
- | ^^^^
help: provide the argument
|
LL ~ needlesArr.iter().fold(|x, y| {
found type `u8`
note: required by a bound in `cloned`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
- |
-LL | Self: Sized + Iterator<Item = &'a T>,
- | ^^^^^^^^^^^^ required by this bound in `Iterator::cloned`
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error[E0599]: the method `collect` exists for struct `Cloned<TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:7:21: 7:25]>>`, but its trait bounds were not satisfied
--> $DIR/issue-31173.rs:12:10
|
LL | .collect();
| ^^^^^^^ method cannot be called on `Cloned<TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:7:21: 7:25]>>` due to unsatisfied trait bounds
+ --> $SRC_DIR/core/src/iter/adapters/take_while.rs:LL:COL
|
- ::: $SRC_DIR/core/src/iter/adapters/take_while.rs:LL:COL
- |
-LL | pub struct TakeWhile<I, P> {
- | -------------------------- doesn't satisfy `<_ as Iterator>::Item = &_`
- |
- ::: $SRC_DIR/core/src/iter/adapters/cloned.rs:LL:COL
+ = note: doesn't satisfy `<_ as Iterator>::Item = &_`
+ --> $SRC_DIR/core/src/iter/adapters/cloned.rs:LL:COL
|
-LL | pub struct Cloned<I> {
- | -------------------- doesn't satisfy `_: Iterator`
+ = note: doesn't satisfy `_: Iterator`
|
= note: the following trait bounds were not satisfied:
`<TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:7:21: 7:25]> as Iterator>::Item = &_`
...
LL | foo!();
| ------ in this macro invocation
+ --> $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
- ::: $SRC_DIR/core/src/macros/mod.rs:LL:COL
- |
-LL | pub macro derive_const($item:item) {
- | ---------------------- similarly named attribute macro `derive_const` defined here
+ = note: similarly named attribute macro `derive_const` defined here
|
= note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
|
LL | #[derive_Clone]
| ^^^^^^^^^^^^ help: an attribute macro with a similar name exists: `derive_const`
+ --> $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
- ::: $SRC_DIR/core/src/macros/mod.rs:LL:COL
- |
-LL | pub macro derive_const($item:item) {
- | ---------------------- similarly named attribute macro `derive_const` defined here
+ = note: similarly named attribute macro `derive_const` defined here
error: aborting due to 2 previous errors
found tuple `(&_, &_)`
note: required by a bound in `cloned`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
- |
-LL | Self: Sized + Iterator<Item = &'a T>,
- | ^^^^^^^^^^^^ required by this bound in `Iterator::cloned`
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error[E0271]: expected `std::collections::hash_map::Iter<'_, _, _>` to be an iterator that yields `&_`, but it yields `(&_, &_)`
--> $DIR/issue-33941.rs:6:14
| `Iterator::Item` is `&(_, _, _)` here
note: required by a bound in `collect`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
- |
-LL | fn collect<B: FromIterator<Self::Item>>(self) -> B
- | ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Iterator::collect`
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error: aborting due to 2 previous errors
|
note: the module `sys` is defined here
--> $SRC_DIR/std/src/lib.rs:LL:COL
- |
-LL | mod sys;
- | ^^^^^^^
error: aborting due to 2 previous errors
found reference `&'static str`
note: associated function defined here
--> $SRC_DIR/core/src/slice/mod.rs:LL:COL
- |
-LL | pub fn starts_with(&self, needle: &[T]) -> bool
- | ^^^^^^^^^^^
= note: this error originates in the macro `stringify` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to previous error
= help: every closure has a distinct type and so could not always match the caller-chosen type of parameter `F`
note: associated function defined here
--> $SRC_DIR/alloc/src/boxed.rs:LL:COL
- |
-LL | pub fn new(x: T) -> Self {
- | ^^^
error: aborting due to previous error
|
note: this function takes ownership of the receiver `self`, which moves `bad_letters`
--> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
- |
-LL | fn into_iter(self) -> Self::IntoIter;
- | ^^^^
help: consider iterating over a slice of the `Vec<char>`'s content to avoid moving into the `for` loop
|
LL | for l in &bad_letters {
|
note: this function takes ownership of the receiver `self`, which moves `orig`
--> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
- |
-LL | fn into_iter(self) -> Self::IntoIter;
- | ^^^^
help: consider iterating over a slice of the `Vec<bool>`'s content to avoid moving into the `for` loop
|
LL | for _val in &orig {}
| ^^^^^^^^^^^ `Iterator::Item` is `&f64` here
note: required by a bound in `collect`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
- |
-LL | fn collect<B: FromIterator<Self::Item>>(self) -> B
- | ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Iterator::collect`
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error[E0277]: a value of type `Vec<f64>` cannot be built from an iterator over elements of type `&f64`
--> $DIR/issue-66923-show-error-for-correct-call.rs:12:29
| ^^^^^^^^^^^ `Iterator::Item` is `&f64` here
note: required by a bound in `collect`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
- |
-LL | fn collect<B: FromIterator<Self::Item>>(self) -> B
- | ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Iterator::collect`
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error: aborting due to 2 previous errors
|
LL | impl Fo {
| ^^ help: a trait with a similar name exists: `Fn`
+ --> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
- ::: $SRC_DIR/core/src/ops/function.rs:LL:COL
- |
-LL | pub trait Fn<Args: Tuple>: FnMut<Args> {
- | -------------------------------------- similarly named trait `Fn` defined here
+ = note: similarly named trait `Fn` defined here
error: aborting due to previous error
|
note: this function takes ownership of the receiver `self`, which moves `v`
--> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
- |
-LL | fn into_iter(self) -> Self::IntoIter;
- | ^^^^
help: consider creating a fresh reborrow of `v` here
|
LL | for n in &mut *v {
= help: the trait `FromIterator<{integer}>` is not implemented for `[u32; 10]`
note: required by a bound in `collect`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
- |
-LL | fn collect<B: FromIterator<Self::Item>>(self) -> B
- | ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Iterator::collect`
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error: aborting due to previous error
= help: the trait `Sized` is not implemented for `[i32]`
note: required by a bound in `collect`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
- |
-LL | fn collect<B: FromIterator<Self::Item>>(self) -> B
- | ^ required by this bound in `Iterator::collect`
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error[E0277]: a slice of type `[i32]` cannot be built since `[i32]` has no definite size
--> $DIR/collect-into-slice.rs:6:38
= help: the trait `FromIterator<{integer}>` is not implemented for `[i32]`
note: required by a bound in `collect`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
- |
-LL | fn collect<B: FromIterator<Self::Item>>(self) -> B
- | ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Iterator::collect`
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error: aborting due to 3 previous errors
| |__________^ `Iterator::Item` changed to `()` here
note: required by a bound in `std::iter::Iterator::sum`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
- |
-LL | S: Sum<Self::Item>,
- | ^^^^^^^^^^^^^^^ required by this bound in `Iterator::sum`
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error[E0277]: a value of type `i32` cannot be made by summing an iterator over elements of type `()`
--> $DIR/invalid-iterator-chain.rs:18:14
| ^^^^^^^^^^^^^^^ `Iterator::Item` changed to `()` here
note: required by a bound in `std::iter::Iterator::sum`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
- |
-LL | S: Sum<Self::Item>,
- | ^^^^^^^^^^^^^^^ required by this bound in `Iterator::sum`
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error[E0277]: a value of type `i32` cannot be made by summing an iterator over elements of type `f64`
--> $DIR/invalid-iterator-chain.rs:28:14
| -------------------- `Iterator::Item` remains `f64` here
note: required by a bound in `std::iter::Iterator::sum`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
- |
-LL | S: Sum<Self::Item>,
- | ^^^^^^^^^^^^^^^ required by this bound in `Iterator::sum`
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error[E0277]: a value of type `i32` cannot be made by summing an iterator over elements of type `()`
--> $DIR/invalid-iterator-chain.rs:30:54
| this expression has type `Vec<{integer}>`
note: required by a bound in `std::iter::Iterator::sum`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
- |
-LL | S: Sum<Self::Item>,
- | ^^^^^^^^^^^^^^^ required by this bound in `Iterator::sum`
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error[E0277]: a value of type `i32` cannot be made by summing an iterator over elements of type `&()`
--> $DIR/invalid-iterator-chain.rs:31:40
| this expression has type `Vec<()>`
note: required by a bound in `std::iter::Iterator::sum`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
- |
-LL | S: Sum<Self::Item>,
- | ^^^^^^^^^^^^^^^ required by this bound in `Iterator::sum`
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error[E0277]: a value of type `Vec<i32>` cannot be built from an iterator over elements of type `()`
--> $DIR/invalid-iterator-chain.rs:40:25
| ----------------- `Iterator::Item` remains `()` here
note: required by a bound in `collect`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
- |
-LL | fn collect<B: FromIterator<Self::Item>>(self) -> B
- | ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Iterator::collect`
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error: aborting due to 6 previous errors
|
LL | vec![true, false].map(|v| !v).collect::<Vec<_>>();
| ^^^ `Vec<bool>` is not an iterator; try calling `.into_iter()` or `.iter()`
+ --> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
|
- ::: $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
- |
-LL | pub struct Vec<T, #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global> {
- | ------------------------------------------------------------------------------------------------ doesn't satisfy `Vec<bool>: Iterator`
+ = note: doesn't satisfy `Vec<bool>: Iterator`
|
= note: the following trait bounds were not satisfied:
`Vec<bool>: Iterator`
= help: the trait `FromIterator<_>` is not implemented for `Bar`
note: required by a bound in `collect`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
- |
-LL | fn collect<B: FromIterator<Self::Item>>(self) -> B
- | ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Iterator::collect`
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error: aborting due to previous error
= help: the trait `FromIterator<_>` is not implemented for `Foo`
note: required by a bound in `collect`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
- |
-LL | fn collect<B: FromIterator<Self::Item>>(self) -> B
- | ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Iterator::collect`
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error[E0277]: a value of type `impl Debug` cannot be built from an iterator over elements of type `_`
--> $DIR/recursion4.rs:19:28
= help: the trait `FromIterator<_>` is not implemented for `impl Debug`
note: required by a bound in `collect`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
- |
-LL | fn collect<B: FromIterator<Self::Item>>(self) -> B
- | ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Iterator::collect`
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error: aborting due to 2 previous errors
error[E0080]: values of the type `[u8; SIZE]` are too big for the current architecture
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
|
-LL | intrinsics::size_of::<T>()
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
note: inside `std::mem::size_of::<[u8; SIZE]>`
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
- |
-LL | intrinsics::size_of::<T>()
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `main`
--> $DIR/issue-55878.rs:7:26
|
|
note: enums with multiple inhabited variants have to be initialized to a variant
--> $SRC_DIR/core/src/result.rs:LL:COL
- |
-LL | pub enum Result<T, E> {
- | ^^^^^^^^^^^^^^^^^^^^^
error: the type `&i32` does not permit zero-initialization
--> $DIR/invalid_value.rs:152:34
= note: the mutable reference will refer to this temporary, not the original `const` item
note: mutable reference created due to call to this method
--> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
- |
-LL | pub fn push(&mut self, value: T) {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: `const` item defined here
--> $DIR/lint-const-item-mutation.rs:31:1
|
|
note: this function takes ownership of the receiver `self`, which moves `x`
--> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
- |
-LL | fn into_iter(self) -> Self::IntoIter;
- | ^^^^
help: consider iterating over a slice of the `Vec<S>`'s content to avoid moving into the `for` loop
|
LL | for y in &x {
| |
| `mutex` dropped here while still borrowed
|
-help: consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped
- --> $SRC_DIR/core/src/macros/mod.rs:LL:COL
- |
-LL | $dst.write_fmt($crate::format_args!($($arg)*));
- | +
error[E0597]: `mutex` does not live long enough
--> $DIR/format-args-temporaries-in-write.rs:47:29
| |
| `mutex` dropped here while still borrowed
|
-help: consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped
- --> $SRC_DIR/core/src/macros/mod.rs:LL:COL
- |
-LL | $dst.write_fmt($crate::format_args_nl!($($arg)*));
- | +
error: aborting due to 2 previous errors
|
LL | printlx!("oh noes!");
| ^^^^^^^ help: a macro with a similar name exists: `println`
+ --> $SRC_DIR/std/src/macros.rs:LL:COL
|
- ::: $SRC_DIR/std/src/macros.rs:LL:COL
- |
-LL | macro_rules! println {
- | -------------------- similarly named macro `println` defined here
+ = note: similarly named macro `println` defined here
error: aborting due to previous error
|
LL | inline!();
| ^^^^^^ help: a macro with a similar name exists: `line`
+ --> $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
- ::: $SRC_DIR/core/src/macros/mod.rs:LL:COL
- |
-LL | macro_rules! line {
- | ----------------- similarly named macro `line` defined here
+ = note: similarly named macro `line` defined here
|
= note: `inline` is in scope, but it is an attribute: `#[inline]`
error[E0773]: attempted to define built-in macro more than once
--> $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
-LL | macro_rules! line {
- | ^^^^^^^^^^^^^^^^^
- |
note: previously defined here
--> $DIR/unknown-builtin.rs:9:1
|
|
note: required by a bound in `Copy`
--> $SRC_DIR/core/src/marker.rs:LL:COL
- |
-LL | pub trait Copy: Clone {
- | ^^^^^ required by this bound in `Copy`
= note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider annotating `Test1` with `#[derive(Clone)]`
|
|
note: required by a bound in `Copy`
--> $SRC_DIR/core/src/marker.rs:LL:COL
- |
-LL | pub trait Copy: Clone {
- | ^^^^^ required by this bound in `Copy`
= note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider annotating `Test2` with `#[derive(Clone)]`
|
which is required by `&mut Foo: Iterator`
note: the following trait must be implemented
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
- |
-LL | pub trait Iterator {
- | ^^^^^^^^^^^^^^^^^^
= help: items from traits can only be used if the trait is implemented and in scope
= note: the following trait defines an item `take`, perhaps you need to implement it:
candidate #1: `Iterator`
|
LL | 0.clone::<'a>();
| ^^
+ --> $SRC_DIR/core/src/clone.rs:LL:COL
|
- ::: $SRC_DIR/core/src/clone.rs:LL:COL
- |
-LL | fn clone(&self) -> Self;
- | - the late bound lifetime parameter is introduced here
+ = note: the late bound lifetime parameter is introduced here
|
= 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 #42868 <https://github.com/rust-lang/rust/issues/42868>
| ^^^^^^^^^^ must implement `AddAssign<_>`
note: the following trait must be implemented
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
- |
-LL | pub trait AddAssign<Rhs = Self> {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error
|
note: required by a bound in `map`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
- |
-LL | F: FnMut(Self::Item) -> B,
- | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Iterator::map`
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error[E0593]: closure is expected to take a single 2-tuple as argument, but it takes 3 distinct arguments
--> $DIR/closure-arg-count.rs:27:57
|
note: required by a bound in `map`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
- |
-LL | F: FnMut(Self::Item) -> B,
- | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Iterator::map`
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error[E0593]: function is expected to take a single 2-tuple as argument, but it takes 2 distinct arguments
--> $DIR/closure-arg-count.rs:29:57
|
note: required by a bound in `map`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
- |
-LL | F: FnMut(Self::Item) -> B,
- | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Iterator::map`
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error[E0593]: function is expected to take 1 argument, but it takes 2 arguments
--> $DIR/closure-arg-count.rs:32:45
|
note: required by a bound in `map`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
- |
-LL | F: FnMut(Self::Item) -> B,
- | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Iterator::map`
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error[E0593]: function is expected to take 0 arguments, but it takes 1 argument
--> $DIR/closure-arg-count.rs:35:10
found closure signature `fn((u32, u32)) -> _`
note: required by a bound in `map`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
- |
-LL | F: FnMut(Self::Item) -> B,
- | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Iterator::map`
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error[E0631]: type mismatch in closure arguments
--> $DIR/closure-arg-type-mismatch.rs:4:14
found closure signature `for<'a> fn(&'a (u16, u16)) -> _`
note: required by a bound in `map`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
- |
-LL | F: FnMut(Self::Item) -> B,
- | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Iterator::map`
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error[E0631]: type mismatch in closure arguments
--> $DIR/closure-arg-type-mismatch.rs:5:14
found closure signature `fn((u16, u16)) -> _`
note: required by a bound in `map`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
- |
-LL | F: FnMut(Self::Item) -> B,
- | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Iterator::map`
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error: aborting due to 3 previous errors
found type `bool` (`bool`)
note: tuple variant defined here
--> $SRC_DIR/core/src/option.rs:LL:COL
- |
-LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^^^
error: aborting due to previous error
found closure signature `for<'a> fn(&'a str) -> _`
note: required by a bound in `filter`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
- |
-LL | P: FnMut(&Self::Item) -> bool,
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Iterator::filter`
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error[E0599]: the method `count` exists for struct `Filter<Fuse<std::iter::Once<&str>>, [closure@$DIR/issue-36053-2.rs:7:39: 7:48]>`, but its trait bounds were not satisfied
--> $DIR/issue-36053-2.rs:7:55
| |
| doesn't satisfy `<_ as FnOnce<(&&str,)>>::Output = bool`
| doesn't satisfy `_: FnMut<(&&str,)>`
+ --> $SRC_DIR/core/src/iter/adapters/filter.rs:LL:COL
|
- ::: $SRC_DIR/core/src/iter/adapters/filter.rs:LL:COL
- |
-LL | pub struct Filter<I, P> {
- | ----------------------- doesn't satisfy `_: Iterator`
+ = note: doesn't satisfy `_: Iterator`
|
= note: the following trait bounds were not satisfied:
`<[closure@$DIR/issue-36053-2.rs:7:39: 7:48] as FnOnce<(&&str,)>>::Output = bool`
|
note: required by a bound in `Option::<T>::map`
--> $SRC_DIR/core/src/option.rs:LL:COL
- |
-LL | F: ~const FnOnce(T) -> U,
- | ^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Option::<T>::map`
+$SRC_DIR/core/src/option.rs:LL:COL
+$SRC_DIR/core/src/option.rs:LL:COL
+$SRC_DIR/core/src/option.rs:LL:COL
error: aborting due to previous error
|
note: required by a bound in `Option::<T>::map`
--> $SRC_DIR/core/src/option.rs:LL:COL
- |
-LL | F: ~const FnOnce(T) -> U,
- | ^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Option::<T>::map`
+$SRC_DIR/core/src/option.rs:LL:COL
+$SRC_DIR/core/src/option.rs:LL:COL
+$SRC_DIR/core/src/option.rs:LL:COL
error[E0593]: function is expected to take 0 arguments, but it takes 1 argument
--> $DIR/issue-47706.rs:27:9
|
LL | fn next(&mut self) -> Option<IteratorChunk<T, S>> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found `fn(&'1 mut ChunkingIterator<T, S>) -> Option<IteratorChunk<'1, T, S>>`
+ --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
|
- ::: $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
- |
-LL | fn next(&mut self) -> Option<Self::Item>;
- | ----------------------------------------- expected `fn(&'1 mut ChunkingIterator<T, S>) -> Option<IteratorChunk<'static, T, S>>`
+ = note: expected `fn(&'1 mut ChunkingIterator<T, S>) -> Option<IteratorChunk<'static, T, S>>`
|
= note: expected `fn(&'1 mut ChunkingIterator<T, S>) -> Option<IteratorChunk<'static, T, S>>`
found `fn(&'1 mut ChunkingIterator<T, S>) -> Option<IteratorChunk<'1, T, S>>`
= note: add `#[derive(Debug)]` to `Foo` or manually `impl Debug for Foo`
note: required by a bound in `Result::<T, E>::unwrap`
--> $SRC_DIR/core/src/result.rs:LL:COL
- |
-LL | E: fmt::Debug,
- | ^^^^^^^^^^ required by this bound in `Result::<T, E>::unwrap`
+$SRC_DIR/core/src/result.rs:LL:COL
+$SRC_DIR/core/src/result.rs:LL:COL
help: consider annotating `Foo` with `#[derive(Debug)]`
|
LL | #[derive(Debug)]
= note: enum `std::option::Option` and enum `Option` have similar names, but are actually distinct types
note: enum `std::option::Option` is defined in crate `core`
--> $SRC_DIR/core/src/option.rs:LL:COL
- |
-LL | pub enum Option<T> {
- | ^^^^^^^^^^^^^^^^^^
note: enum `Option` is defined in the current crate
--> $DIR/similar_paths.rs:1:1
|
|
note: this function takes ownership of the receiver `self`, which moves `val.0`
--> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
- |
-LL | fn into_iter(self) -> Self::IntoIter;
- | ^^^^
= note: move occurs because `val.0` has type `Vec<bool>`, which does not implement the `Copy` trait
error[E0382]: use of moved value: `foo`
| ^^^^^^^ value used here after move
|
note: calling this operator moves the left-hand side
- --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
+ --> $DIR/move-fn-self-receiver.rs:58:5
|
-LL | fn add(self, rhs: Rhs) -> Self::Output;
- | ^^^^
+LL | foo_add + Foo;
+ | ^^^^^^^^^^^^^
error[E0382]: use of moved value: `implicit_into_iter`
--> $DIR/move-fn-self-receiver.rs:63:5
|
note: this function takes ownership of the receiver `self`, which moves `x`
--> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
- |
-LL | fn into_iter(self) -> Self::IntoIter;
- | ^^^^
help: consider cloning the value if the performance cost is acceptable
|
LL | consume(x.clone().into_iter().next().unwrap());
|
note: this function takes ownership of the receiver `self`, which moves `x`
--> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
- |
-LL | fn into_iter(self) -> Self::IntoIter;
- | ^^^^
help: consider cloning the value if the performance cost is acceptable
|
LL | let _y = x.clone().into_iter().next().unwrap();
|
note: this function takes ownership of the receiver `self`, which moves `x`
--> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
- |
-LL | fn into_iter(self) -> Self::IntoIter;
- | ^^^^
help: consider cloning the value if the performance cost is acceptable
|
LL | let _y = [x.clone().into_iter().next().unwrap(); 1];
|
note: impl defined here, but it is not `const`
--> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
- |
-LL | impl<I: Iterator> const IntoIterator for I {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: calls in constants are limited to constant functions, tuple structs and tuple variants
error[E0658]: mutable references are not allowed in constants
found struct `RangeTo<{integer}>`
note: associated function defined here
--> $SRC_DIR/core/src/ops/range.rs:LL:COL
- |
-LL | pub const fn new(start: Idx, end: Idx) -> Self {
- | ^^^
error: aborting due to 2 previous errors
| ^^^^^^^^ value borrowed here after move
|
= note: borrow occurs due to deref coercion to `Vec<i32>`
-note: deref defined here
- --> $SRC_DIR/alloc/src/sync.rs:LL:COL
- |
-LL | type Target = T;
- | ^^^^^^^^^^^
error: aborting due to previous error
| ^^^^^^^^ value borrowed here after move
|
= note: borrow occurs due to deref coercion to `Vec<i32>`
-note: deref defined here
- --> $SRC_DIR/alloc/src/sync.rs:LL:COL
- |
-LL | type Target = T;
- | ^^^^^^^^^^^
error: aborting due to previous error
| ^^^^^^
note: required by a bound in `spawn`
--> $SRC_DIR/std/src/thread/mod.rs:LL:COL
- |
-LL | F: Send + 'static,
- | ^^^^ required by this bound in `spawn`
+$SRC_DIR/std/src/thread/mod.rs:LL:COL
+$SRC_DIR/std/src/thread/mod.rs:LL:COL
+$SRC_DIR/std/src/thread/mod.rs:LL:COL
+$SRC_DIR/std/src/thread/mod.rs:LL:COL
error: aborting due to previous error
| this expression has type `Vec<()>`
note: required by a bound in `std::iter::Iterator::sum`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
- |
-LL | S: Sum<Self::Item>,
- | ^^^^^^^^^^^^^^^ required by this bound in `Iterator::sum`
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error[E0277]: a value of type `i32` cannot be made by multiplying all elements of type `&()` from an iterator
--> $DIR/sum.rs:7:25
| this expression has type `Vec<()>`
note: required by a bound in `std::iter::Iterator::product`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
- |
-LL | P: Product<Self::Item>,
- | ^^^^^^^^^^^^^^^^^^^ required by this bound in `Iterator::product`
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error: aborting due to 2 previous errors
| ^^^^^^ 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> {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 5 previous errors
|
note: required by a bound in `FnMut`
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
- |
-LL | pub trait FnMut<Args: Tuple>: FnOnce<Args> {
- | ^^^^^ required by this bound in `FnMut`
error[E0059]: type parameter to bare `FnOnce` trait must be a tuple
--> $DIR/overloaded-calls-nontuple.rs:18:6
|
note: required by a bound in `FnOnce`
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
- |
-LL | pub trait FnOnce<Args: Tuple> {
- | ^^^^^ required by this bound in `FnOnce`
error[E0277]: functions with the "rust-call" ABI must take a single non-self tuple argument
--> $DIR/overloaded-calls-nontuple.rs:12:5
LL |
LL | fn main() {}
| ^^ unexpected token
+ --> $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
- ::: $SRC_DIR/core/src/macros/mod.rs:LL:COL
- |
-LL | ($left:expr, $right:expr $(,)?) => {
- | ---------- while parsing argument for this `expr` macro fragment
+ = note: while parsing argument for this `expr` macro fragment
error: aborting due to 4 previous errors
|
LL | fn _f<F: fn(), G>(_: impl fn(), _: &dyn fn())
| ^^ help: a trait with a similar name exists (notice the capitalization): `Fn`
+ --> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
- ::: $SRC_DIR/core/src/ops/function.rs:LL:COL
- |
-LL | pub trait Fn<Args: Tuple>: FnMut<Args> {
- | -------------------------------------- similarly named trait `Fn` defined here
+ = note: similarly named trait `Fn` defined here
error[E0405]: cannot find trait `r#fn` in this scope
--> $DIR/kw-in-trait-bounds.rs:17:4
|
LL | G: fn(),
| ^^ help: a trait with a similar name exists (notice the capitalization): `Fn`
+ --> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
- ::: $SRC_DIR/core/src/ops/function.rs:LL:COL
- |
-LL | pub trait Fn<Args: Tuple>: FnMut<Args> {
- | -------------------------------------- similarly named trait `Fn` defined here
+ = note: similarly named trait `Fn` defined here
error[E0405]: cannot find trait `r#fn` in this scope
--> $DIR/kw-in-trait-bounds.rs:3:27
|
LL | fn _f<F: fn(), G>(_: impl fn(), _: &dyn fn())
| ^^ help: a trait with a similar name exists (notice the capitalization): `Fn`
+ --> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
- ::: $SRC_DIR/core/src/ops/function.rs:LL:COL
- |
-LL | pub trait Fn<Args: Tuple>: FnMut<Args> {
- | -------------------------------------- similarly named trait `Fn` defined here
+ = note: similarly named trait `Fn` defined here
error[E0405]: cannot find trait `r#fn` in this scope
--> $DIR/kw-in-trait-bounds.rs:3:41
|
LL | fn _f<F: fn(), G>(_: impl fn(), _: &dyn fn())
| ^^ help: a trait with a similar name exists (notice the capitalization): `Fn`
+ --> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
- ::: $SRC_DIR/core/src/ops/function.rs:LL:COL
- |
-LL | pub trait Fn<Args: Tuple>: FnMut<Args> {
- | -------------------------------------- similarly named trait `Fn` defined here
+ = note: similarly named trait `Fn` defined here
error[E0405]: cannot find trait `r#struct` in this scope
--> $DIR/kw-in-trait-bounds.rs:24:10
note: `Option<i32>` defined here
--> $SRC_DIR/core/src/option.rs:LL:COL
|
-LL | pub enum Option<T> {
- | ------------------
-...
-LL | None,
- | ^^^^ not covered
+ = note:
+$SRC_DIR/core/src/option.rs:LL:COL: not covered
= note: the matched value is of type `Option<i32>`
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
note: `Option<HiddenEnum>` defined here
--> $SRC_DIR/core/src/option.rs:LL:COL
|
-LL | pub enum Option<T> {
- | ------------------
-...
-LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^^^ not covered
+ = note:
+$SRC_DIR/core/src/option.rs:LL:COL: not covered
= note: the matched value is of type `Option<HiddenEnum>`
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
|
note: `Option<Enum>` defined here
--> $SRC_DIR/core/src/option.rs:LL:COL
|
-LL | pub enum Option<T> {
- | ^^^^^^^^^^^^^^^^^^
+ = note:
= note: the matched value is of type `Option<Enum>`
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown, or multiple match arms
|
|
note: `Box<ElementKind>` defined here
--> $SRC_DIR/alloc/src/boxed.rs:LL:COL
- |
-LL | / pub struct Box<
-LL | | T: ?Sized,
-LL | | #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global,
-LL | | >(Unique<T>, A);
- | |_^
+$SRC_DIR/alloc/src/boxed.rs:LL:COL
+$SRC_DIR/alloc/src/boxed.rs:LL:COL
+$SRC_DIR/alloc/src/boxed.rs:LL:COL:
= note: the matched value is of type `Box<ElementKind>`
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
note: `Option<Option<Direction>>` defined here
--> $SRC_DIR/core/src/option.rs:LL:COL
|
-LL | pub enum Option<T> {
- | ------------------
-...
-LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^^^
- | |
- | not covered
- | not covered
+ = note:
+$SRC_DIR/core/src/option.rs:LL:COL: not covered
+: not covered
= note: the matched value is of type `Option<Option<Direction>>`
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
note: `Option<Private>` defined here
--> $SRC_DIR/core/src/option.rs:LL:COL
|
-LL | pub enum Option<T> {
- | ------------------
-...
-LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^^^ not covered
+ = note:
+$SRC_DIR/core/src/option.rs:LL:COL: not covered
= note: the matched value is of type `Option<Private>`
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
note: `Option<i32>` defined here
--> $SRC_DIR/core/src/option.rs:LL:COL
|
-LL | pub enum Option<T> {
- | ------------------
-...
-LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^^^ not covered
+ = note:
+$SRC_DIR/core/src/option.rs:LL:COL: not covered
= note: the matched value is of type `Option<i32>`
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
Pub.method();
//~^ ERROR type `for<'a> fn(&'a Self) {<Self as PrivTr>::method}` is private
<Pub as PrivTr>::CONST;
- //~^ ERROR associated constant `<Pub as PrivTr>::CONST` is private
+ //~^ ERROR associated constant `PrivTr::CONST` is private
let _: <Pub as PrivTr>::AssocTy;
- //~^ ERROR associated type `<Pub as PrivTr>::AssocTy` is private
+ //~^ ERROR associated type `PrivTr::AssocTy` is private
pub type InSignatureTy = <Pub as PrivTr>::AssocTy;
//~^ ERROR trait `PrivTr` is private
pub trait InSignatureTr: PrivTr {}
|
= note: this error originates in the macro `priv_trait::mac` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: associated constant `<Pub as PrivTr>::CONST` is private
+error: associated constant `PrivTr::CONST` is private
--> $DIR/associated-item-privacy-trait.rs:21:9
|
LL | <Pub as PrivTr>::CONST;
|
= note: this error originates in the macro `priv_trait::mac` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: associated type `<Pub as PrivTr>::AssocTy` is private
+error: associated type `PrivTr::AssocTy` is private
--> $DIR/associated-item-privacy-trait.rs:23:16
|
LL | let _: <Pub as PrivTr>::AssocTy;
// aux-build:private-inferred-type.rs
// error-pattern:type `fn() {ext::priv_fn}` is private
-// error-pattern:static `PRIV_STATIC` is private
+// error-pattern:static `ext::PRIV_STATIC` is private
// error-pattern:type `ext::PrivEnum` is private
// error-pattern:type `fn() {<u8 as ext::PrivTrait>::method}` is private
// error-pattern:type `fn(u8) -> ext::PrivTupleStruct {ext::PrivTupleStruct}` is private
|
= note: this error originates in the macro `ext::m` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: static `PRIV_STATIC` is private
+error: static `ext::PRIV_STATIC` is private
--> $DIR/private-inferred-type-3.rs:16:5
|
LL | ext::m!();
= help: the trait `PartialEq` is not implemented for `PriorityQueue<T>`
note: required by a bound in `PartialOrd`
--> $SRC_DIR/core/src/cmp.rs:LL:COL
- |
-LL | pub trait PartialOrd<Rhs: ?Sized = Self>: PartialEq<Rhs> {
- | ^^^^^^^^^^^^^^ required by this bound in `PartialOrd`
= note: this error originates in the derive macro `PartialOrd` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `PriorityQueue<T>: Eq` is not satisfied
|
note: required by a bound in `Ord`
--> $SRC_DIR/core/src/cmp.rs:LL:COL
- |
-LL | pub trait Ord: Eq + PartialOrd<Self> {
- | ^^ required by this bound in `Ord`
= note: this error originates in the derive macro `AddImpl` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: can't compare `T` with `T`
| ^^^^^^^^^^
note: required by a bound in `Ord`
--> $SRC_DIR/core/src/cmp.rs:LL:COL
- |
-LL | pub trait Ord: Eq + PartialOrd<Self> {
- | ^^^^^^^^^^^^^^^^ required by this bound in `Ord`
= note: this error originates in the derive macro `AddImpl` which comes from the expansion of the derive macro `PartialOrd` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 3 previous errors
...
LL | one!("hello", "world");
| ---------------------- in this macro invocation
+ --> $SRC_DIR/core/src/result.rs:LL:COL
|
- ::: $SRC_DIR/core/src/result.rs:LL:COL
- |
-LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
- | -- similarly named tuple variant `Ok` defined here
+ = note: similarly named tuple variant `Ok` defined here
|
= note: this error originates in the macro `parent_source_spans` which comes from the expansion of the macro `one` (in Nightly builds, run with -Z macro-backtrace for more info)
...
LL | two!("yay", "rust");
| ------------------- in this macro invocation
+ --> $SRC_DIR/core/src/result.rs:LL:COL
|
- ::: $SRC_DIR/core/src/result.rs:LL:COL
- |
-LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
- | -- similarly named tuple variant `Ok` defined here
+ = note: similarly named tuple variant `Ok` defined here
|
= note: this error originates in the macro `parent_source_spans` which comes from the expansion of the macro `two` (in Nightly builds, run with -Z macro-backtrace for more info)
...
LL | three!("hip", "hop");
| -------------------- in this macro invocation
+ --> $SRC_DIR/core/src/result.rs:LL:COL
|
- ::: $SRC_DIR/core/src/result.rs:LL:COL
- |
-LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
- | -- similarly named tuple variant `Ok` defined here
+ = note: similarly named tuple variant `Ok` defined here
|
= note: this error originates in the macro `parent_source_spans` which comes from the expansion of the macro `three` (in Nightly builds, run with -Z macro-backtrace for more info)
|
LL | #[derive(Dlone)]
| ^^^^^ help: a derive macro with a similar name exists: `Clone`
+ --> $SRC_DIR/core/src/clone.rs:LL:COL
|
- ::: $SRC_DIR/core/src/clone.rs:LL:COL
- |
-LL | pub macro Clone($item:item) {
- | --------------- similarly named derive macro `Clone` defined here
+ = note: similarly named derive macro `Clone` defined here
error: cannot find derive macro `Dlone` in this scope
--> $DIR/resolve-error.rs:35:10
|
LL | #[derive(Dlone)]
| ^^^^^ help: a derive macro with a similar name exists: `Clone`
+ --> $SRC_DIR/core/src/clone.rs:LL:COL
|
- ::: $SRC_DIR/core/src/clone.rs:LL:COL
- |
-LL | pub macro Clone($item:item) {
- | --------------- similarly named derive macro `Clone` defined here
+ = note: similarly named derive macro `Clone` defined here
error: cannot find attribute `FooWithLongNan` in this scope
--> $DIR/resolve-error.rs:32:3
= note: unsafe function cannot be called generically without an unsafe block
note: required by a bound in `ProcMacro::custom_derive`
--> $SRC_DIR/proc_macro/src/bridge/client.rs:LL:COL
- |
-LL | expand: impl Fn(crate::TokenStream) -> crate::TokenStream + Copy,
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `ProcMacro::custom_derive`
+$SRC_DIR/proc_macro/src/bridge/client.rs:LL:COL
+$SRC_DIR/proc_macro/src/bridge/client.rs:LL:COL
+$SRC_DIR/proc_macro/src/bridge/client.rs:LL:COL
+$SRC_DIR/proc_macro/src/bridge/client.rs:LL:COL
error: aborting due to previous error
// ignore-pretty
// aux-build:span-api-tests.rs
// aux-build:span-test-macros.rs
+// compile-flags: -Ztranslate-remapped-path-to-local-path=yes
#[macro_use]
extern crate span_test_macros;
= help: the trait `Sized` is not implemented for `[{integer}]`
note: required by a bound in `RangeFrom`
--> $SRC_DIR/core/src/ops/range.rs:LL:COL
- |
-LL | pub struct RangeFrom<Idx> {
- | ^^^ required by this bound in `RangeFrom`
error: aborting due to 3 previous errors
note: `Result<u32, &R<'_>>` defined here
--> $SRC_DIR/core/src/result.rs:LL:COL
|
-LL | pub enum Result<T, E> {
- | ---------------------
-...
-LL | Err(#[stable(feature = "rust1", since = "1.0.0")] E),
- | ^^^ not covered
+ = note:
+$SRC_DIR/core/src/result.rs:LL:COL: not covered
= note: the matched value is of type `Result<u32, &R<'_>>`
help: you might want to use `if let` to ignore the variant that isn't matched
|
|
LL | type B = Opiton<u8>; // Misspelled type name from the prelude.
| ^^^^^^ help: an enum with a similar name exists: `Option`
+ --> $SRC_DIR/core/src/option.rs:LL:COL
|
- ::: $SRC_DIR/core/src/option.rs:LL:COL
- |
-LL | pub enum Option<T> {
- | ------------------ similarly named enum `Option` defined here
+ = note: similarly named enum `Option` defined here
error[E0412]: cannot find type `Baz` in this scope
--> $DIR/levenshtein.rs:16:14
|
note: function defined here
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
- |
-LL | pub const fn size_of<T>() -> usize {
- | ^^^^^^^
help: remove the extra argument
|
LL | std::mem::size_of();
= note: required for `Result<f32, ParseFloatError>` to implement `Termination`
note: required by a bound in `assert_test_result`
--> $SRC_DIR/test/src/lib.rs:LL:COL
- |
-LL | pub fn assert_test_result<T: Termination>(result: T) -> Result<(), String> {
- | ^^^^^^^^^^^ required by this bound in `assert_test_result`
= note: this error originates in the attribute macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to previous error
LL | let _ = dbg!(a);
| ^ value used here after move
|
-help: borrow this binding in the pattern to avoid moving the value
- --> $SRC_DIR/std/src/macros.rs:LL:COL
- |
-LL | ref tmp => {
- | +++
error: aborting due to previous error
| ^^^^^^^^^^ 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> {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0369]: cannot add `String` to `&str`
--> $DIR/issue-39018.rs:11:22
-// compile-flags: -Z simulate-remapped-rust-src-base=/rustc/FAKE_PREFIX -Z translate-remapped-path-to-local-path=no -Z ui-testing=no
+// compile-flags: -Z ui-testing=no
struct MyError;
impl std::error::Error for MyError {}
|
note: tuple variant defined here
--> $SRC_DIR/core/src/result.rs:LL:COL
- |
-LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^
help: provide the argument
|
LL | let _: Result<(), String> = Ok(());
|
note: the module `thread_info` is defined here
--> $SRC_DIR/std/src/thread/mod.rs:LL:COL
- |
-LL | use crate::sys_common::thread_info;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error
= help: the trait `SliceIndex<[T]>` is implemented for `usize`
note: required by a bound in `core::str::<impl str>::get`
--> $SRC_DIR/core/src/str/mod.rs:LL:COL
- |
-LL | pub const fn get<I: ~const SliceIndex<str>>(&self, i: I) -> Option<&I::Output> {
- | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `core::str::<impl str>::get`
error[E0277]: the type `str` cannot be indexed by `{integer}`
--> $DIR/str-idx.rs:5:29
= help: the trait `SliceIndex<[T]>` is implemented for `usize`
note: required by a bound in `core::str::<impl str>::get_unchecked`
--> $SRC_DIR/core/src/str/mod.rs:LL:COL
- |
-LL | pub const unsafe fn get_unchecked<I: ~const SliceIndex<str>>(&self, i: I) -> &I::Output {
- | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `core::str::<impl str>::get_unchecked`
error[E0277]: the type `str` cannot be indexed by `char`
--> $DIR/str-idx.rs:6:19
= help: the trait `SliceIndex<[T]>` is implemented for `usize`
note: required by a bound in `core::str::<impl str>::get_mut`
--> $SRC_DIR/core/src/str/mod.rs:LL:COL
- |
-LL | pub const fn get_mut<I: ~const SliceIndex<str>>(&mut self, i: I) -> Option<&mut I::Output> {
- | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `core::str::<impl str>::get_mut`
error[E0277]: the type `str` cannot be indexed by `{integer}`
--> $DIR/str-mut-idx.rs:11:25
= help: the trait `SliceIndex<[T]>` is implemented for `usize`
note: required by a bound in `core::str::<impl str>::get_unchecked_mut`
--> $SRC_DIR/core/src/str/mod.rs:LL:COL
- |
-LL | pub const unsafe fn get_unchecked_mut<I: ~const SliceIndex<str>>(
- | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `core::str::<impl str>::get_unchecked_mut`
+$SRC_DIR/core/src/str/mod.rs:LL:COL
+$SRC_DIR/core/src/str/mod.rs:LL:COL
+$SRC_DIR/core/src/str/mod.rs:LL:COL
error[E0277]: the type `str` cannot be indexed by `char`
--> $DIR/str-mut-idx.rs:13:7
found type `{integer}`
note: tuple variant defined here
--> $SRC_DIR/core/src/option.rs:LL:COL
- |
-LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^^^
help: remove the extra argument
|
LL | let _: Option<(i32, bool)> = Some(/* (i32, bool) */);
|
note: tuple variant defined here
--> $SRC_DIR/core/src/option.rs:LL:COL
- |
-LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^^^
help: provide the argument
|
LL | let _: Option<(i8,)> = Some(/* (i8,) */);
found type `usize`
note: tuple variant defined here
--> $SRC_DIR/core/src/option.rs:LL:COL
- |
-LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^^^
error[E0308]: mismatched types
--> $DIR/args-instead-of-tuple-errors.rs:17:34
found type `usize`
note: tuple variant defined here
--> $SRC_DIR/core/src/option.rs:LL:COL
- |
-LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^^^
error: aborting due to 5 previous errors
|
note: tuple variant defined here
--> $SRC_DIR/core/src/result.rs:LL:COL
- |
-LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^
help: wrap these arguments in parentheses to construct a tuple
|
LL | let _: Result<(i32, i8), ()> = Ok((1, 2));
|
note: tuple variant defined here
--> $SRC_DIR/core/src/option.rs:LL:COL
- |
-LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^^^
help: wrap these arguments in parentheses to construct a tuple
|
LL | let _: Option<(i32, i8, &'static str)> = Some((1, 2, "hi"));
|
note: tuple variant defined here
--> $SRC_DIR/core/src/option.rs:LL:COL
- |
-LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^^^
help: provide the argument
|
LL | let _: Option<()> = Some(());
found type `{integer}`
note: tuple variant defined here
--> $SRC_DIR/core/src/option.rs:LL:COL
- |
-LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^^^
help: use a trailing comma to create a tuple with one element
|
LL | let _: Option<(i32,)> = Some((3,));
found type `{integer}`
note: tuple variant defined here
--> $SRC_DIR/core/src/option.rs:LL:COL
- |
-LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^^^
help: use a trailing comma to create a tuple with one element
|
LL | let _: Option<(i32,)> = Some((3,));
|
note: this function takes ownership of the receiver `self`, which moves `foo`
--> $SRC_DIR/core/src/option.rs:LL:COL
- |
-LL | pub const fn map<U, F>(self, f: F) -> Option<U>
- | ^^^^
error: aborting due to previous error
|
LL | #[tests]
| ^^^^^ help: an attribute macro with a similar name exists: `test`
+ --> $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
- ::: $SRC_DIR/core/src/macros/mod.rs:LL:COL
- |
-LL | pub macro test($item:item) {
- | -------------- similarly named attribute macro `test` defined here
+ = note: similarly named attribute macro `test` defined here
error: cannot find attribute `deprcated` in this scope
--> $DIR/attribute-typos.rs:1:3
|
note: this function takes ownership of the receiver `self`, which moves `a`
--> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
- |
-LL | fn into_iter(self) -> Self::IntoIter;
- | ^^^^
help: consider iterating over a slice of the `Vec<i32>`'s content to avoid moving into the `for` loop
|
LL | for j in &a {
|
note: required by a bound in `std::mem::size_of`
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
- |
-LL | pub const fn size_of<T>() -> usize {
- | ^ required by this bound in `size_of`
help: consider further restricting `Self`
|
LL | trait Foo<T>: Sized {
|
note: required by a bound in `std::mem::size_of`
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
- |
-LL | pub const fn size_of<T>() -> usize {
- | ^ required by this bound in `size_of`
help: consider further restricting `Self`
|
LL | trait Bar: std::fmt::Display + Sized {
|
note: required by a bound in `std::mem::size_of`
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
- |
-LL | pub const fn size_of<T>() -> usize {
- | ^ required by this bound in `size_of`
help: consider further restricting `Self`
|
LL | trait Baz: Sized where Self: std::fmt::Display {
|
note: required by a bound in `std::mem::size_of`
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
- |
-LL | pub const fn size_of<T>() -> usize {
- | ^ required by this bound in `size_of`
help: consider further restricting `Self`
|
LL | trait Qux<T>: Sized where Self: std::fmt::Display {
|
note: required by a bound in `std::mem::size_of`
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
- |
-LL | pub const fn size_of<T>() -> usize {
- | ^ required by this bound in `size_of`
help: consider further restricting `Self`
|
LL | trait Bat<T>: std::fmt::Display + Sized {
| ^^^^^^^^^^^^ ^^^^^^^^^
note: required by a bound in `Eq`
--> $SRC_DIR/core/src/cmp.rs:LL:COL
- |
-LL | pub trait Eq: PartialEq<Self> {
- | ^^^^^^^^^^^^^^^ required by this bound in `Eq`
= note: this error originates in the derive macro `Eq` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider restricting type parameter `T`
|
`CloneEnum: Default`
note: the following trait must be implemented
--> $SRC_DIR/core/src/default.rs:LL:COL
- |
-LL | pub trait Default: Sized {
- | ^^^^^^^^^^^^^^^^^^^^^^^^
help: consider annotating `Enum` with `#[derive(Clone)]`
|
LL | #[derive(Clone)]
...
LL | let y = x.test();
| ^^^^ method cannot be called on `Foo<Vec<Enum>, Instant>` due to unsatisfied trait bounds
+ --> $SRC_DIR/std/src/time.rs:LL:COL
|
- ::: $SRC_DIR/std/src/time.rs:LL:COL
- |
-LL | pub struct Instant(time::Instant);
- | ------------------ doesn't satisfy `Instant: Default`
- |
- ::: $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
+ = note: doesn't satisfy `Instant: Default`
+ --> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
|
-LL | pub struct Vec<T, #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global> {
- | ------------------------------------------------------------------------------------------------ doesn't satisfy `Vec<Enum>: Clone`
+ = note: doesn't satisfy `Vec<Enum>: Clone`
|
= note: the following trait bounds were not satisfied:
`Vec<Enum>: Clone`
|
LL | impl result {
| ^^^^^^ help: an enum with a similar name exists: `Result`
+ --> $SRC_DIR/core/src/result.rs:LL:COL
|
- ::: $SRC_DIR/core/src/result.rs:LL:COL
- |
-LL | pub enum Result<T, E> {
- | --------------------- similarly named enum `Result` defined here
+ = note: similarly named enum `Result` defined here
error[E0573]: expected type, found variant `Err`
--> $DIR/do-not-attempt-to-add-suggestions-with-no-changes.rs:3:25
found type parameter `F`
note: associated function defined here
--> $SRC_DIR/core/src/pin.rs:LL:COL
- |
-LL | pub const fn new(pointer: P) -> Pin<P> {
- | ^^^
error[E0277]: `dyn Future<Output = i32> + Send` cannot be unpinned
--> $DIR/expected-boxed-future-isnt-pinned.rs:19:14
= note: consider using `Box::pin`
note: required by a bound in `Pin::<P>::new`
--> $SRC_DIR/core/src/pin.rs:LL:COL
- |
-LL | impl<P: Deref<Target: Unpin>> Pin<P> {
- | ^^^^^ required by this bound in `Pin::<P>::new`
error[E0277]: `dyn Future<Output = i32> + Send` cannot be unpinned
--> $DIR/expected-boxed-future-isnt-pinned.rs:24:14
= note: consider using `Box::pin`
note: required by a bound in `Pin::<P>::new`
--> $SRC_DIR/core/src/pin.rs:LL:COL
- |
-LL | impl<P: Deref<Target: Unpin>> Pin<P> {
- | ^^^^^ required by this bound in `Pin::<P>::new`
error[E0308]: mismatched types
--> $DIR/expected-boxed-future-isnt-pinned.rs:28:5
found `async` block `[async block@$DIR/expected-boxed-future-isnt-pinned.rs:28:5: 30:6]`
note: function defined here
--> $SRC_DIR/core/src/future/mod.rs:LL:COL
- |
-LL | pub const fn identity_future<O, Fut: Future<Output = O>>(f: Fut) -> Fut {
- | ^^^^^^^^^^^^^^^
help: you need to pin and box this expression
|
LL ~ Box::pin(async {
|
note: this function takes ownership of the receiver `self`, which moves `self.v`
--> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
- |
-LL | fn into_iter(self) -> Self::IntoIter;
- | ^^^^
help: consider iterating over a slice of the `Vec<u32>`'s content to avoid moving into the `for` loop
|
LL | for _ in &self.v {
|
note: this function takes ownership of the receiver `self`, which moves value
--> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
- |
-LL | fn into_iter(self) -> Self::IntoIter;
- | ^^^^
help: consider iterating over a slice of the `Vec<&u8>`'s content to avoid moving into the `for` loop
|
LL | for loader in &*LOADERS {
|
LL | t.min().unwrap()
| ^^^
+ --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
|
- ::: $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
- |
-LL | Self: Sized,
- | ----- this has a `Sized` requirement
+ = note: this has a `Sized` requirement
|
= note: you need `&mut dyn Iterator<Item = &u64>` instead of `&dyn Iterator<Item = &u64>`
|
LL | h.finish()
| ^^^^^^ method not found in `DefaultHasher`
+ --> $SRC_DIR/core/src/hash/mod.rs:LL:COL
|
- ::: $SRC_DIR/core/src/hash/mod.rs:LL:COL
- |
-LL | fn finish(&self) -> u64;
- | ------ the method is available for `DefaultHasher` here
+ = note: the method is available for `DefaultHasher` here
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
| ^^^^^^^------ help: remove these generics
| |
| expected 0 generic arguments
- |
-note: associated function defined here, with 0 generic parameters
- --> $SRC_DIR/core/src/../../portable-simd/crates/core_simd/src/ord.rs:LL:COL
- |
-LL | fn simd_gt(self, other: Self) -> Self::Mask;
- | ^^^^^^^
error[E0425]: cannot find function `simd_gt` in this scope
--> $DIR/issue-104287.rs:6:5
= note: required for `String` to implement `Pattern<'_>`
note: required by a bound in `core::str::<impl str>::find`
--> $SRC_DIR/core/src/str/mod.rs:LL:COL
- |
-LL | pub fn find<'a, P: Pattern<'a>>(&'a self, pat: P) -> Option<usize> {
- | ^^^^^^^^^^^ required by this bound in `core::str::<impl str>::find`
help: consider borrowing here
|
LL | println!("{:?}", line.find(&pattern));
LL | let _ = 42.into::<Option<_>>();
| ^^^^ expected 0 generic arguments
|
-note: associated function defined here, with 0 generic parameters
- --> $SRC_DIR/core/src/convert/mod.rs:LL:COL
- |
-LL | fn into(self) -> T;
- | ^^^^
help: consider moving this generic argument to the `Into` trait, which takes up to 1 argument
|
LL | let _ = Into::<Option<_>>::into(42);
= note: `std::io::Write` is implemented for `&mut dyn std::io::Write`, but not for `&dyn std::io::Write`
note: required by a bound in `BufWriter::<W>::new`
--> $SRC_DIR/std/src/io/buffered/bufwriter.rs:LL:COL
- |
-LL | impl<W: Write> BufWriter<W> {
- | ^^^^^ required by this bound in `BufWriter::<W>::new`
error[E0277]: the trait bound `&dyn std::io::Write: std::io::Write` is not satisfied
--> $DIR/mut-borrow-needed-by-trait.rs:17:14
= note: `std::io::Write` is implemented for `&mut dyn std::io::Write`, but not for `&dyn std::io::Write`
note: required by a bound in `BufWriter`
--> $SRC_DIR/std/src/io/buffered/bufwriter.rs:LL:COL
- |
-LL | pub struct BufWriter<W: Write> {
- | ^^^^^ required by this bound in `BufWriter`
error[E0599]: the method `write_fmt` exists for struct `BufWriter<&dyn std::io::Write>`, but its trait bounds were not satisfied
--> $DIR/mut-borrow-needed-by-trait.rs:21:5
|
LL | writeln!(fp, "hello world").unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ method cannot be called on `BufWriter<&dyn std::io::Write>` due to unsatisfied trait bounds
+ --> $SRC_DIR/std/src/io/buffered/bufwriter.rs:LL:COL
|
- ::: $SRC_DIR/std/src/io/buffered/bufwriter.rs:LL:COL
- |
-LL | pub struct BufWriter<W: Write> {
- | ------------------------------ doesn't satisfy `BufWriter<&dyn std::io::Write>: std::io::Write`
+ = note: doesn't satisfy `BufWriter<&dyn std::io::Write>: std::io::Write`
|
= note: the following trait bounds were not satisfied:
`&dyn std::io::Write: std::io::Write`
|
note: this function takes ownership of the receiver `self`, which moves `selection.1`
--> $SRC_DIR/core/src/option.rs:LL:COL
- |
-LL | pub const fn unwrap(self) -> T {
- | ^^^^
error[E0507]: cannot move out of `selection.1` which is behind a shared reference
--> $DIR/option-content-move.rs:27:20
|
note: this function takes ownership of the receiver `self`, which moves `selection.1`
--> $SRC_DIR/core/src/result.rs:LL:COL
- |
-LL | pub fn unwrap(self) -> T
- | ^^^^
error: aborting due to 2 previous errors
| ^^^^^^^^^^^^^^^^^ 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> {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement
|
LL | fn qux<T>(a: Wrapper<T>, b: T) -> T where Wrapper<T>: Add<T, Output = T> {
found closure `[closure@$DIR/sugg-else-for-closure.rs:6:26: 6:28]`
note: associated function defined here
--> $SRC_DIR/core/src/option.rs:LL:COL
- |
-LL | pub const fn unwrap_or(self, default: T) -> T
- | ^^^^^^^^^
help: try calling `unwrap_or_else` instead
|
LL | let _s = y.unwrap_or_else(|| x.split('.').nth(1).unwrap());
|
note: required by a bound in `BufReader::<R>::new`
--> $SRC_DIR/std/src/io/buffered/bufreader.rs:LL:COL
- |
-LL | impl<R: Read> BufReader<R> {
- | ^^^^ required by this bound in `BufReader::<R>::new`
help: consider removing the leading `&`-reference
|
LL - let mut stream_reader = BufReader::new(&stream);
|
LL | stream_reader.read_until(b'\n', &mut buffer).expect("Reading into buffer failed");
| ^^^^^^^^^^ method cannot be called on `BufReader<&T>` due to unsatisfied trait bounds
+ --> $SRC_DIR/std/src/io/buffered/bufreader.rs:LL:COL
|
- ::: $SRC_DIR/std/src/io/buffered/bufreader.rs:LL:COL
- |
-LL | pub struct BufReader<R> {
- | ----------------------- doesn't satisfy `BufReader<&T>: BufRead`
+ = note: doesn't satisfy `BufReader<&T>: BufRead`
|
= note: the following trait bounds were not satisfied:
`&T: std::io::Read`
|
LL | let _i: i16 = 0_i32.try_into().unwrap();
| ^^^^^^^^ method not found in `i32`
+ --> $SRC_DIR/core/src/convert/mod.rs:LL:COL
|
- ::: $SRC_DIR/core/src/convert/mod.rs:LL:COL
- |
-LL | fn try_into(self) -> Result<T, Self::Error>;
- | -------- the method is available for `i32` here
+ = note: the method is available for `i32` here
|
= help: items from traits can only be used if the trait is in scope
= note: 'std::convert::TryInto' is included in the prelude starting in Edition 2021
LL | let _: Vec<A:B> = A::B;
| ^^^ expected at least 1 generic argument
|
-note: struct defined here, with at least 1 generic parameter: `T`
- --> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
- |
-LL | pub struct Vec<T, #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global> {
- | ^^^ -
help: add missing generic argument
|
LL | let _: Vec<T, A:B> = A::B;
|
LL | struct Foo<T>(dyn SendEqAlias<T>);
| ^^^^^^^^^^^^^^ missing reference to `Rhs`
+ --> $SRC_DIR/core/src/cmp.rs:LL:COL
|
- ::: $SRC_DIR/core/src/cmp.rs:LL:COL
- |
-LL | pub trait PartialEq<Rhs: ?Sized = Self> {
- | --------------------------------------- type parameter `Rhs` must be specified for this
+ = note: type parameter `Rhs` must be specified for this
|
= note: because of the default `Self` reference, type parameters must be specified on object types
|
LL | struct Bar<T>(dyn SendEqAlias<T>, T);
| ^^^^^^^^^^^^^^ missing reference to `Rhs`
+ --> $SRC_DIR/core/src/cmp.rs:LL:COL
|
- ::: $SRC_DIR/core/src/cmp.rs:LL:COL
- |
-LL | pub trait PartialEq<Rhs: ?Sized = Self> {
- | --------------------------------------- type parameter `Rhs` must be specified for this
+ = note: type parameter `Rhs` must be specified for this
|
= note: because of the default `Self` reference, type parameters must be specified on object types
note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
--> $SRC_DIR/core/src/cmp.rs:LL:COL
|
-LL | pub trait Eq: PartialEq<Self> {
- | ^^^^^^^^^^^^^^^ the trait cannot be made into an object because it uses `Self` as a type parameter
+ = note: the trait cannot be made into an object because it uses `Self` as a type parameter
error[E0191]: the value of the associated type `Item` (from trait `Iterator`) must be specified
--> $DIR/object-fail.rs:9:17
|
LL | struct Foo<T> where T: Bar, <T as Bar>::Baz: String {
| ^^^^^^ not a trait
+ --> $SRC_DIR/alloc/src/string.rs:LL:COL
|
- ::: $SRC_DIR/alloc/src/string.rs:LL:COL
- |
-LL | pub trait ToString {
- | ------------------ similarly named trait `ToString` defined here
+ = note: similarly named trait `ToString` defined here
|
help: constrain the associated type to `String`
|
|
LL | struct Qux<'a, T> where T: Bar, <&'a T as Bar>::Baz: String {
| ^^^^^^ not a trait
+ --> $SRC_DIR/alloc/src/string.rs:LL:COL
|
- ::: $SRC_DIR/alloc/src/string.rs:LL:COL
- |
-LL | pub trait ToString {
- | ------------------ similarly named trait `ToString` defined here
+ = note: similarly named trait `ToString` defined here
|
help: constrain the associated type to `String`
|
|
LL | fn foo<T: Bar>(_: T) where <T as Bar>::Baz: String {
| ^^^^^^ not a trait
+ --> $SRC_DIR/alloc/src/string.rs:LL:COL
|
- ::: $SRC_DIR/alloc/src/string.rs:LL:COL
- |
-LL | pub trait ToString {
- | ------------------ similarly named trait `ToString` defined here
+ = note: similarly named trait `ToString` defined here
|
help: constrain the associated type to `String`
|
|
LL | fn qux<'a, T: Bar>(_: &'a T) where <&'a T as Bar>::Baz: String {
| ^^^^^^ not a trait
+ --> $SRC_DIR/alloc/src/string.rs:LL:COL
|
- ::: $SRC_DIR/alloc/src/string.rs:LL:COL
- |
-LL | pub trait ToString {
- | ------------------ similarly named trait `ToString` defined here
+ = note: similarly named trait `ToString` defined here
|
help: constrain the associated type to `String`
|
|
LL | fn issue_95327() where <u8 as Unresolved>::Assoc: String {}
| ^^^^^^ help: a trait with a similar name exists: `ToString`
+ --> $SRC_DIR/alloc/src/string.rs:LL:COL
|
- ::: $SRC_DIR/alloc/src/string.rs:LL:COL
- |
-LL | pub trait ToString {
- | ------------------ similarly named trait `ToString` defined here
+ = note: similarly named trait `ToString` defined here
error: aborting due to 6 previous errors
= help: the trait `Sized` is not implemented for `dyn Trait`
note: required by a bound in `Vec`
--> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
- |
-LL | pub struct Vec<T, #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global> {
- | ^ required by this bound in `Vec`
error[E0277]: the size for values of type `dyn Trait` cannot be known at compilation time
--> $DIR/bad-sized.rs:4:37
= help: the trait `Sized` is not implemented for `dyn Trait`
note: required by a bound in `Vec::<T>::new`
--> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
- |
-LL | impl<T> Vec<T> {
- | ^ required by this bound in `Vec::<T>::new`
error[E0277]: the size for values of type `dyn Trait` cannot be known at compilation time
--> $DIR/bad-sized.rs:4:37
= help: the trait `Sized` is not implemented for `dyn Trait`
note: required by a bound in `Vec`
--> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
- |
-LL | pub struct Vec<T, #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global> {
- | ^ required by this bound in `Vec`
error: aborting due to 4 previous errors
where T: ?Sized;
note: required by a bound in `HashMap::<K, V, S>::get`
--> $SRC_DIR/std/src/collections/hash/map.rs:LL:COL
- |
-LL | K: Borrow<Q>,
- | ^^^^^^^^^ required by this bound in `HashMap::<K, V, S>::get`
+$SRC_DIR/std/src/collections/hash/map.rs:LL:COL
+$SRC_DIR/std/src/collections/hash/map.rs:LL:COL
+$SRC_DIR/std/src/collections/hash/map.rs:LL:COL
help: consider specifying the generic argument
|
LL | opts.get::<Q>(opt.as_ref());
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`mutual_recursion_issue_75860`)
note: required by a bound in `Option`
--> $SRC_DIR/core/src/option.rs:LL:COL
- |
-LL | pub enum Option<T> {
- | ^ required by this bound in `Option`
error: aborting due to previous error
= note: required for `&NoToSocketAddrs` to implement `ToSocketAddrs`
note: required by a bound in `TcpListener::bind`
--> $SRC_DIR/std/src/net/tcp.rs:LL:COL
- |
-LL | pub fn bind<A: ToSocketAddrs>(addr: A) -> io::Result<TcpListener> {
- | ^^^^^^^^^^^^^ required by this bound in `TcpListener::bind`
help: consider dereferencing here
|
LL | let _errors = TcpListener::bind(&*bad);
= note: required for `&char` to implement `Pattern<'_>`
note: required by a bound in `core::str::<impl str>::contains`
--> $SRC_DIR/core/src/str/mod.rs:LL:COL
- |
-LL | pub fn contains<'a, P: Pattern<'a>>(&'a self, pat: P) -> bool {
- | ^^^^^^^^^^^ required by this bound in `core::str::<impl str>::contains`
help: consider dereferencing here
|
LL | .filter(|c| "aeiou".contains(*c))
|
note: required by a bound in `std::mem::size_of`
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
- |
-LL | pub const fn size_of<T>() -> usize {
- | ^ required by this bound in `size_of`
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
LL - fn check<T: Iterator, U: ?Sized>() {
| ^^^^
note: required by a bound in `std::mem::size_of`
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
- |
-LL | pub const fn size_of<T>() -> usize {
- | ^ required by this bound in `size_of`
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
LL - fn check<T: Iterator, U: ?Sized>() {
= help: the trait `Sized` is not implemented for `[T]`
note: required by a bound in `std::mem::size_of`
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
- |
-LL | pub const fn size_of<T>() -> usize {
- | ^ required by this bound in `size_of`
error[E0277]: the size for values of type `[&U]` cannot be known at compilation time
--> $DIR/suggest-where-clause.rs:31:20
= help: the trait `Sized` is not implemented for `[&U]`
note: required by a bound in `std::mem::size_of`
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
- |
-LL | pub const fn size_of<T>() -> usize {
- | ^ required by this bound in `size_of`
error: aborting due to 7 previous errors
LL | | ASSUME_VALIDITY,
LL | | ASSUME_VISIBILITY,
| |_____________________________- help: remove these generic arguments
- |
-note: trait defined here, with at most 3 generic parameters: `Src`, `Context`, `ASSUME`
- --> $SRC_DIR/core/src/mem/transmutability.rs:LL:COL
- |
-LL | pub unsafe trait BikeshedIntrinsicFrom<Src, Context, const ASSUME: Assume = { Assume::NOTHING }>
- | ^^^^^^^^^^^^^^^^^^^^^ --- ------- ------------------------------------------
error: aborting due to previous error
found struct `Vec<String>`
note: associated function defined here
--> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
- |
-LL | pub fn push(&mut self, value: T) {
- | ^^^^
help: remove the extra argument
|
LL | groups.push(/* (Vec<String>, Vec<Process>) */);
|
note: associated function defined here
--> $SRC_DIR/alloc/src/collections/vec_deque/mod.rs:LL:COL
- |
-LL | pub fn push_back(&mut self, value: T) {
- | ^^^^^^^^^
help: wrap these arguments in parentheses to construct a tuple
|
LL | self.acc.push_back((self.current_provides, self.current_requires));
LL | input_cells: Vec::new()
| ^^^ expected at least 1 generic argument
|
-note: struct defined here, with at least 1 generic parameter: `T`
- --> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
- |
-LL | pub struct Vec<T, #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global> {
- | ^^^ -
help: add missing generic argument
|
LL | input_cells: Vec<T>::new()
|
note: associated function defined here
--> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
- |
-LL | pub fn with_capacity(capacity: usize) -> Self {
- | ^^^^^^^^^^^^^
help: remove the extra argument
|
LL | let x: Vec::with_capacity(10);
| ^^^^^^^^ must implement `std::ops::Neg`
note: the following trait must be implemented
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
- |
-LL | pub trait Neg {
- | ^^^^^^^^^^^^^
error[E0308]: mismatched types
--> $DIR/type-ascription-precedence.rs:45:5
error: reached the type-length limit while instantiating `std::mem::drop::<Option<((((..., ..., ...), ..., ...), ..., ...), ..., ...)>>`
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
|
-LL | pub fn drop<T>(_x: T) {}
- | ^^^^^^^^^^^^^^^^^^^^^
- |
= help: consider adding a `#![type_length_limit="10"]` attribute to your crate
= note: the full type name has been written to '$TEST_BUILD_DIR/type_length_limit/type_length_limit.long-type.txt'
found unit type `()`
note: tuple variant defined here
--> $SRC_DIR/core/src/result.rs:LL:COL
- |
-LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^
help: try wrapping the expression in `Some`
|
LL | fn main() { test(Ok(Some(()))); }
| |
| expected 2 generic arguments
|
-note: enum defined here, with 2 generic parameters: `T`, `E`
- --> $SRC_DIR/core/src/result.rs:LL:COL
- |
-LL | pub enum Result<T, E> {
- | ^^^^^^ - -
help: add missing generic argument
|
LL | pub fn run() -> Result<_, E> {
| |
| expected 2 generic arguments
|
-note: enum defined here, with 2 generic parameters: `T`, `E`
- --> $SRC_DIR/core/src/result.rs:LL:COL
- |
-LL | pub enum Result<T, E> {
- | ^^^^^^ - -
help: add missing generic argument
|
LL | pub fn interact(&mut self) -> Result<_, E> {
|
LL | impl F {
| ^ help: a trait with a similar name exists: `Fn`
+ --> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
- ::: $SRC_DIR/core/src/ops/function.rs:LL:COL
- |
-LL | pub trait Fn<Args: Tuple>: FnMut<Args> {
- | -------------------------------------- similarly named trait `Fn` defined here
+ = note: similarly named trait `Fn` defined here
error[E0412]: cannot find type `TestResult` in this scope
--> $DIR/issue-83693.rs:9:22
found type `{integer}`
note: associated function defined here
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
- |
-LL | extern "rust-call" fn call_once(self, args: Args) -> Self::Output;
- | ^^^^^^^^^
error: aborting due to 2 previous errors
|
note: tuple variant defined here
--> $SRC_DIR/core/src/option.rs:LL:COL
- |
-LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^^^
help: remove the extra argument
|
LL | let _ = Some(3);
|
note: tuple variant defined here
--> $SRC_DIR/core/src/result.rs:LL:COL
- |
-LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^
help: remove the extra arguments
|
LL | let _ = Ok(3);
|
note: tuple variant defined here
--> $SRC_DIR/core/src/result.rs:LL:COL
- |
-LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^
help: provide the argument
|
LL | let _ = Ok(/* value */);
| ^^^^--- help: remove these generics
| |
| expected 0 generic arguments
- |
-note: trait defined here, with 0 generic parameters
- --> $SRC_DIR/core/src/marker.rs:LL:COL
- |
-LL | pub trait Copy: Clone {
- | ^^^^
error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/typeck-builtin-bound-type-parameters.rs:4:14
| ^^^^---------- help: remove these generics
| |
| expected 0 generic arguments
- |
-note: trait defined here, with 0 generic parameters
- --> $SRC_DIR/core/src/marker.rs:LL:COL
- |
-LL | pub trait Copy: Clone {
- | ^^^^
error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/typeck-builtin-bound-type-parameters.rs:7:21
| ^^^^--- help: remove these generics
| |
| expected 0 generic arguments
- |
-note: trait defined here, with 0 generic parameters
- --> $SRC_DIR/core/src/marker.rs:LL:COL
- |
-LL | pub trait Copy: Clone {
- | ^^^^
error[E0107]: this trait takes 0 lifetime arguments but 1 lifetime argument was supplied
--> $DIR/typeck-builtin-bound-type-parameters.rs:10:25
| ^^^^---- help: remove these generics
| |
| expected 0 lifetime arguments
- |
-note: trait defined here, with 0 lifetime parameters
- --> $SRC_DIR/core/src/marker.rs:LL:COL
- |
-LL | pub trait Copy: Clone {
- | ^^^^
error[E0107]: this trait takes 0 lifetime arguments but 1 lifetime argument was supplied
--> $DIR/typeck-builtin-bound-type-parameters.rs:13:15
| ^^^^ -- help: remove this lifetime argument
| |
| expected 0 lifetime arguments
- |
-note: trait defined here, with 0 lifetime parameters
- --> $SRC_DIR/core/src/marker.rs:LL:COL
- |
-LL | pub trait Copy: Clone {
- | ^^^^
error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/typeck-builtin-bound-type-parameters.rs:13:15
| ^^^^ - help: remove this generic argument
| |
| expected 0 generic arguments
- |
-note: trait defined here, with 0 generic parameters
- --> $SRC_DIR/core/src/marker.rs:LL:COL
- |
-LL | pub trait Copy: Clone {
- | ^^^^
error: aborting due to 6 previous errors
|
note: associated function defined here
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
- |
-LL | fn add(self, rhs: Rhs) -> Self::Output;
- | ^^^
help: change the type of the numeric literal from `u32` to `i32`
|
LL | <i32 as Add<i32>>::add(1i32, 2);
|
note: associated function defined here
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
- |
-LL | fn add(self, rhs: Rhs) -> Self::Output;
- | ^^^
help: change the type of the numeric literal from `u32` to `i32`
|
LL | <i32 as Add<i32>>::add(1, 2i32);
|
note: required by a bound in `Fn`
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
- |
-LL | pub trait Fn<Args: Tuple>: FnMut<Args> {
- | ^^^^^ required by this bound in `Fn`
error: aborting due to previous error
note: `Result<u32, &Void>` defined here
--> $SRC_DIR/core/src/result.rs:LL:COL
|
-LL | pub enum Result<T, E> {
- | ---------------------
-...
-LL | Err(#[stable(feature = "rust1", since = "1.0.0")] E),
- | ^^^ not covered
+ = note:
+$SRC_DIR/core/src/result.rs:LL:COL: not covered
= note: the matched value is of type `Result<u32, &Void>`
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
note: `Result<u32, Void>` defined here
--> $SRC_DIR/core/src/result.rs:LL:COL
|
-LL | pub enum Result<T, E> {
- | ---------------------
-...
-LL | Err(#[stable(feature = "rust1", since = "1.0.0")] E),
- | ^^^ not covered
+ = note:
+$SRC_DIR/core/src/result.rs:LL:COL: not covered
= note: the matched value is of type `Result<u32, Void>`
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
note: `Result<u32, Void>` defined here
--> $SRC_DIR/core/src/result.rs:LL:COL
|
-LL | pub enum Result<T, E> {
- | ---------------------
-...
-LL | Err(#[stable(feature = "rust1", since = "1.0.0")] E),
- | ^^^ not covered
+ = note:
+$SRC_DIR/core/src/result.rs:LL:COL: not covered
= note: the matched value is of type `Result<u32, Void>`
help: you might want to use `if let` to ignore the variant that isn't matched
|
|
note: required by a bound in `AssertParamIsCopy`
--> $SRC_DIR/core/src/clone.rs:LL:COL
- |
-LL | pub struct AssertParamIsCopy<T: Copy + ?Sized> {
- | ^^^^ required by this bound in `AssertParamIsCopy`
= note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider annotating `U1` with `#[derive(Copy)]`
|
|
note: required by a bound in `AssertParamIsCopy`
--> $SRC_DIR/core/src/clone.rs:LL:COL
- |
-LL | pub struct AssertParamIsCopy<T: Copy + ?Sized> {
- | ^^^^ required by this bound in `AssertParamIsCopy`
= note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider annotating `U1` with `#[derive(Copy)]`
|
|
note: required by a bound in `AssertParamIsEq`
--> $SRC_DIR/core/src/cmp.rs:LL:COL
- |
-LL | pub struct AssertParamIsEq<T: Eq + ?Sized> {
- | ^^ required by this bound in `AssertParamIsEq`
= note: this error originates in the derive macro `Eq` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider annotating `PartialEqNotEq` with `#[derive(Eq)]`
|
|
note: required by a bound in `AssertParamIsEq`
--> $SRC_DIR/core/src/cmp.rs:LL:COL
- |
-LL | pub struct AssertParamIsEq<T: Eq + ?Sized> {
- | ^^ required by this bound in `AssertParamIsEq`
= note: this error originates in the derive macro `Eq` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider annotating `PartialEqNotEq` with `#[derive(Eq)]`
|
...
LL | let _z = y.clone();
| ^^^^^ method cannot be called on `Box<dyn Foo>` due to unsatisfied trait bounds
- |
- ::: $SRC_DIR/alloc/src/boxed.rs:LL:COL
- |
-LL | / pub struct Box<
-LL | | T: ?Sized,
-LL | | #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global,
-LL | | >(Unique<T>, A);
- | |_- doesn't satisfy `Box<dyn Foo>: Clone`
+ --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
+$SRC_DIR/alloc/src/boxed.rs:LL:COL
+$SRC_DIR/alloc/src/boxed.rs:LL:COL
+$SRC_DIR/alloc/src/boxed.rs:LL:COL: doesn't satisfy `Box<dyn Foo>: Clone`
|
= note: the following trait bounds were not satisfied:
`dyn Foo: Sized`
...
LL | let _j = i.clone();
| ^^^^^ method cannot be called on `Box<R>` due to unsatisfied trait bounds
- |
- ::: $SRC_DIR/alloc/src/boxed.rs:LL:COL
- |
-LL | / pub struct Box<
-LL | | T: ?Sized,
-LL | | #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global,
-LL | | >(Unique<T>, A);
- | |_- doesn't satisfy `Box<R>: Clone`
+ --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
+$SRC_DIR/alloc/src/boxed.rs:LL:COL
+$SRC_DIR/alloc/src/boxed.rs:LL:COL
+$SRC_DIR/alloc/src/boxed.rs:LL:COL: doesn't satisfy `Box<R>: Clone`
|
= note: the following trait bounds were not satisfied:
`R: Clone`
| ^^^^^^^^^ value borrowed here after move
|
note: calling this operator moves the left-hand side
- --> $SRC_DIR/core/src/ops/bit.rs:LL:COL
+ --> $DIR/unop-move-semantics.rs:6:5
|
-LL | fn not(self) -> Self::Output;
- | ^^^^
+LL | !x;
+ | ^^
help: consider cloning the value if the performance cost is acceptable
|
LL | !x.clone();
| `*m` moved due to usage in operator
|
note: calling this operator moves the left-hand side
- --> $SRC_DIR/core/src/ops/bit.rs:LL:COL
+ --> $DIR/unop-move-semantics.rs:24:5
|
-LL | fn not(self) -> Self::Output;
- | ^^^^
+LL | !*m;
+ | ^^^
error[E0507]: cannot move out of `*n` which is behind a shared reference
--> $DIR/unop-move-semantics.rs:26:6
= note: required for `&T` to implement `IntoIterator`
note: required by a bound in `Flatten`
--> $SRC_DIR/core/src/iter/adapters/flatten.rs:LL:COL
- |
-LL | pub struct Flatten<I: Iterator<Item: IntoIterator>> {
- | ^^^^^^^^^^^^ required by this bound in `Flatten`
error[E0277]: `&T` is not an iterator
--> $DIR/hir-wf-check-erase-regions.rs:10:27
= note: required for `&T` to implement `IntoIterator`
note: required by a bound in `Flatten`
--> $SRC_DIR/core/src/iter/adapters/flatten.rs:LL:COL
- |
-LL | pub struct Flatten<I: Iterator<Item: IntoIterator>> {
- | ^^^^^^^^^^^^ required by this bound in `Flatten`
error: aborting due to 2 previous errors
= help: the trait `Sized` is not implemented for `[u8]`
note: required by a bound in `Option`
--> $SRC_DIR/core/src/option.rs:LL:COL
- |
-LL | pub enum Option<T> {
- | ^ required by this bound in `Option`
error: aborting due to previous error
rustc.args(&["--json", "future-incompat"]);
}
rustc.arg("-Ccodegen-units=1");
+ // Hide line numbers to reduce churn
rustc.arg("-Zui-testing");
+ // Hide libstd sources from ui tests to make sure we generate the stderr
+ // output that users will see.
+ // Without this, we may be producing good diagnostics in-tree but users
+ // will not see half the information.
+ rustc.arg("-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX");
+ rustc.arg("-Ztranslate-remapped-path-to-local-path=no");
+
rustc.arg("-Zdeduplicate-diagnostics=no");
// FIXME: use this for other modes too, for perf?
rustc.arg("-Cstrip=debuginfo");