Auto merge of #120524 - Nadrieril:rollup-67952ib, r=Nadrieril

Rollup of 9 pull requests

Successful merges:

 - #120207 (check `RUST_BOOTSTRAP_CONFIG` in `profile_user_dist` test)
 - #120321 (pattern_analysis: cleanup the contexts)
 - #120355 (document `FromIterator for Vec` allocation behaviors)
 - #120430 (std: thread_local::register_dtor fix proposal for FreeBSD.)
 - #120469 (Provide more context on derived obligation error primary label)
 - #120472 (Make duplicate lang items fatal)
 - #120490 (Don't hash lints differently to non-lints.)
 - #120495 (Remove the `abi_amdgpu_kernel` feature)
 - #120501 (rustdoc: Correctly handle attribute merge if this is a glob reexport)

r? `@ghost`
`@rustbot` modify labels: rollup
This commit is contained in:
bors 2024-01-31 15:01:22 +00:00
commit 11f32b73e0
245 changed files with 773 additions and 904 deletions

View file

@ -56,11 +56,7 @@ pub(crate) fn conv_to_call_conv(sess: &Session, c: Conv, default_call_conv: Call
sess.dcx().fatal("C-cmse-nonsecure-call call conv is not yet implemented");
}
Conv::Msp430Intr
| Conv::PtxKernel
| Conv::AmdGpuKernel
| Conv::AvrInterrupt
| Conv::AvrNonBlockingInterrupt => {
Conv::Msp430Intr | Conv::PtxKernel | Conv::AvrInterrupt | Conv::AvrNonBlockingInterrupt => {
unreachable!("tried to use {c:?} call conv which only exists on an unsupported target");
}
}

View file

@ -590,7 +590,6 @@ fn from(conv: Conv) -> Self {
Conv::Cold => llvm::ColdCallConv,
Conv::PreserveMost => llvm::PreserveMost,
Conv::PreserveAll => llvm::PreserveAll,
Conv::AmdGpuKernel => llvm::AmdGpuKernel,
Conv::AvrInterrupt => llvm::AvrInterrupt,
Conv::AvrNonBlockingInterrupt => llvm::AvrNonBlockingInterrupt,
Conv::ArmAapcs => llvm::ArmAapcsCallConv,

View file

@ -106,7 +106,6 @@ pub enum CallConv {
X86_Intr = 83,
AvrNonBlockingInterrupt = 84,
AvrInterrupt = 85,
AmdGpuKernel = 91,
}
/// LLVMRustLinkage

View file

@ -109,8 +109,6 @@ pub struct Diagnostic {
/// `span` if there is one. Otherwise, it is `DUMMY_SP`.
pub sort_span: Span,
/// If diagnostic is from Lint, custom hash function ignores children.
/// Otherwise hash is based on the all the fields.
pub is_lint: Option<IsLint>,
/// With `-Ztrack_diagnostics` enabled,
@ -980,22 +978,24 @@ fn keys(
) -> (
&Level,
&[(DiagnosticMessage, Style)],
Vec<(&Cow<'static, str>, &DiagnosticArgValue)>,
&Option<ErrCode>,
&Option<IsLint>,
&MultiSpan,
&[SubDiagnostic],
&Result<Vec<CodeSuggestion>, SuggestionsDisabled>,
Option<&[SubDiagnostic]>,
Vec<(&DiagnosticArgName, &DiagnosticArgValue)>,
&Option<IsLint>,
) {
(
&self.level,
&self.messages,
self.args().collect(),
&self.code,
&self.is_lint,
&self.span,
&self.children,
&self.suggestions,
(if self.is_lint.is_some() { None } else { Some(&self.children) }),
self.args().collect(),
// omit self.sort_span
&self.is_lint,
// omit self.emitted_at
)
}
}

View file

@ -32,6 +32,8 @@ macro_rules! declare_features {
// feature-group-start: removed features
// -------------------------------------------------------------------------
/// Allows using the `amdgpu-kernel` ABI.
(removed, abi_amdgpu_kernel, "CURRENT_RUSTC_VERSION", Some(51575), None),
(removed, advanced_slice_patterns, "1.0.0", Some(62254),
Some("merged into `#![feature(slice_patterns)]`")),
(removed, allocator, "1.0.0", None, None),

View file

@ -321,8 +321,6 @@ pub fn internal(&self, feature: Symbol) -> bool {
// feature-group-start: actual feature gates
// -------------------------------------------------------------------------
/// Allows using the `amdgpu-kernel` ABI.
(unstable, abi_amdgpu_kernel, "1.29.0", Some(51575)),
/// Allows `extern "avr-interrupt" fn()` and `extern "avr-non-blocking-interrupt" fn()`.
(unstable, abi_avr_interrupt, "1.45.0", Some(69664)),
/// Allows `extern "C-cmse-nonsecure-call" fn()`.

View file

@ -1247,7 +1247,6 @@ pub fn fn_can_unwind(tcx: TyCtxt<'_>, fn_def_id: Option<DefId>, abi: SpecAbi) ->
PtxKernel
| Msp430Interrupt
| X86Interrupt
| AmdGpuKernel
| EfiApi
| AvrInterrupt
| AvrNonBlockingInterrupt

View file

@ -26,7 +26,6 @@ fn abi_can_unwind(abi: Abi) -> bool {
PtxKernel
| Msp430Interrupt
| X86Interrupt
| AmdGpuKernel
| EfiApi
| AvrInterrupt
| AvrNonBlockingInterrupt

View file

@ -149,7 +149,9 @@ fn collect_item(&mut self, lang_item: LangItem, item_def_id: DefId, item_span: O
}
};
self.tcx.dcx().emit_err(DuplicateLangItem {
// When there's a duplicate lang item, something went very wrong and there's no value in recovering or doing anything.
// Give the user the one message to let them debug the mess they created and then wish them farewell.
self.tcx.dcx().emit_fatal(DuplicateLangItem {
local_span: item_span,
lang_item_name,
crate_name,

View file

@ -163,7 +163,6 @@
use self::SliceKind::*;
use crate::index;
use crate::usefulness::PlaceCtxt;
use crate::TypeCx;
/// Whether we have seen a constructor in the column or not.
@ -818,8 +817,8 @@ fn as_slice(&self) -> Option<Slice> {
/// The number of fields for this constructor. This must be kept in sync with
/// `Fields::wildcards`.
pub(crate) fn arity(&self, pcx: &PlaceCtxt<'_, Cx>) -> usize {
pcx.ctor_arity(self)
pub(crate) fn arity(&self, cx: &Cx, ty: &Cx::Ty) -> usize {
cx.ctor_arity(self, ty)
}
/// Returns whether `self` is covered by `other`, i.e. whether `self` is a subset of `other`.
@ -827,12 +826,11 @@ pub(crate) fn arity(&self, pcx: &PlaceCtxt<'_, Cx>) -> usize {
/// this checks for inclusion.
// We inline because this has a single call site in `Matrix::specialize_constructor`.
#[inline]
pub(crate) fn is_covered_by(&self, pcx: &PlaceCtxt<'_, Cx>, other: &Self) -> bool {
pub(crate) fn is_covered_by(&self, cx: &Cx, other: &Self) -> bool {
match (self, other) {
(Wildcard, _) => pcx
.mcx
.tycx
.bug(format_args!("Constructor splitting should not have returned `Wildcard`")),
(Wildcard, _) => {
cx.bug(format_args!("Constructor splitting should not have returned `Wildcard`"))
}
// Wildcards cover anything
(_, Wildcard) => true,
// Only a wildcard pattern can match these special constructors.
@ -873,7 +871,7 @@ pub(crate) fn is_covered_by(&self, pcx: &PlaceCtxt<'_, Cx>, other: &Self) -> boo
(Opaque(self_id), Opaque(other_id)) => self_id == other_id,
(Opaque(..), _) | (_, Opaque(..)) => false,
_ => pcx.mcx.tycx.bug(format_args!(
_ => cx.bug(format_args!(
"trying to compare incompatible constructors {self:?} and {other:?}"
)),
}
@ -950,10 +948,10 @@ pub enum ConstructorSet<Cx: TypeCx> {
/// of the `ConstructorSet` for the type, yet if we forgot to include them in `present` we would be
/// ignoring any row with `Opaque`s in the algorithm. Hence the importance of point 4.
#[derive(Debug)]
pub(crate) struct SplitConstructorSet<Cx: TypeCx> {
pub(crate) present: SmallVec<[Constructor<Cx>; 1]>,
pub(crate) missing: Vec<Constructor<Cx>>,
pub(crate) missing_empty: Vec<Constructor<Cx>>,
pub struct SplitConstructorSet<Cx: TypeCx> {
pub present: SmallVec<[Constructor<Cx>; 1]>,
pub missing: Vec<Constructor<Cx>>,
pub missing_empty: Vec<Constructor<Cx>>,
}
impl<Cx: TypeCx> ConstructorSet<Cx> {
@ -962,7 +960,7 @@ impl<Cx: TypeCx> ConstructorSet<Cx> {
/// or slices. This can get subtle; see [`SplitConstructorSet`] for details of this operation
/// and its invariants.
#[instrument(level = "debug", skip(self, ctors), ret)]
pub(crate) fn split<'a>(
pub fn split<'a>(
&self,
ctors: impl Iterator<Item = &'a Constructor<Cx>> + Clone,
) -> SplitConstructorSet<Cx>

View file

@ -6,6 +6,7 @@
#[cfg(feature = "rustc")]
pub(crate) mod lints;
pub mod pat;
pub mod pat_column;
#[cfg(feature = "rustc")]
pub mod rustc;
pub mod usefulness;
@ -67,8 +68,9 @@ pub fn insert(&mut self, elem: T) {
use crate::constructor::{Constructor, ConstructorSet, IntRange};
#[cfg(feature = "rustc")]
use crate::lints::{lint_nonexhaustive_missing_variants, PatternColumn};
use crate::lints::lint_nonexhaustive_missing_variants;
use crate::pat::DeconstructedPat;
use crate::pat_column::PatternColumn;
#[cfg(feature = "rustc")]
use crate::rustc::RustcMatchCheckCtxt;
#[cfg(feature = "rustc")]
@ -135,20 +137,6 @@ fn lint_overlapping_range_endpoints(
}
}
/// Context that provides information global to a match.
pub struct MatchCtxt<'a, Cx: TypeCx> {
/// The context for type information.
pub tycx: &'a Cx,
}
impl<'a, Cx: TypeCx> Clone for MatchCtxt<'a, Cx> {
fn clone(&self) -> Self {
Self { tycx: self.tycx }
}
}
impl<'a, Cx: TypeCx> Copy for MatchCtxt<'a, Cx> {}
/// The arm of a match expression.
#[derive(Debug)]
pub struct MatchArm<'p, Cx: TypeCx> {
@ -175,15 +163,13 @@ pub fn analyze_match<'p, 'tcx>(
) -> Result<rustc::UsefulnessReport<'p, 'tcx>, ErrorGuaranteed> {
let scrut_ty = tycx.reveal_opaque_ty(scrut_ty);
let scrut_validity = ValidityConstraint::from_bool(tycx.known_valid_scrutinee);
let cx = MatchCtxt { tycx };
let report = compute_match_usefulness(cx, arms, scrut_ty, scrut_validity)?;
let report = compute_match_usefulness(tycx, arms, scrut_ty, scrut_validity)?;
// Run the non_exhaustive_omitted_patterns lint. Only run on refutable patterns to avoid hitting
// `if let`s. Only run if the match is exhaustive otherwise the error is redundant.
if tycx.refutable && report.non_exhaustiveness_witnesses.is_empty() {
let pat_column = PatternColumn::new(arms);
lint_nonexhaustive_missing_variants(cx, arms, &pat_column, scrut_ty)?;
lint_nonexhaustive_missing_variants(tycx, arms, &pat_column, scrut_ty)?;
}
Ok(report)

View file

@ -1,109 +1,24 @@
use rustc_session::lint::builtin::NON_EXHAUSTIVE_OMITTED_PATTERNS;
use rustc_span::ErrorGuaranteed;
use crate::constructor::Constructor;
use crate::errors::{NonExhaustiveOmittedPattern, NonExhaustiveOmittedPatternLintOnArm, Uncovered};
use crate::pat::PatOrWild;
use crate::rustc::{
Constructor, DeconstructedPat, MatchArm, MatchCtxt, PlaceCtxt, RevealedTy, RustcMatchCheckCtxt,
SplitConstructorSet, WitnessPat,
};
/// A column of patterns in the matrix, where a column is the intuitive notion of "subpatterns that
/// inspect the same subvalue/place".
/// This is used to traverse patterns column-by-column for lints. Despite similarities with the
/// algorithm in [`crate::usefulness`], this does a different traversal. Notably this is linear in
/// the depth of patterns, whereas `compute_exhaustiveness_and_usefulness` is worst-case exponential
/// (exhaustiveness is NP-complete). The core difference is that we treat sub-columns separately.
///
/// This must not contain an or-pattern. `expand_and_push` takes care to expand them.
///
/// This is not used in the usefulness algorithm; only in lints.
#[derive(Debug)]
pub(crate) struct PatternColumn<'p, 'tcx> {
patterns: Vec<&'p DeconstructedPat<'p, 'tcx>>,
}
impl<'p, 'tcx> PatternColumn<'p, 'tcx> {
pub(crate) fn new(arms: &[MatchArm<'p, 'tcx>]) -> Self {
let patterns = Vec::with_capacity(arms.len());
let mut column = PatternColumn { patterns };
for arm in arms {
column.expand_and_push(PatOrWild::Pat(arm.pat));
}
column
}
/// Pushes a pattern onto the column, expanding any or-patterns into its subpatterns.
/// Internal method, prefer [`PatternColumn::new`].
fn expand_and_push(&mut self, pat: PatOrWild<'p, RustcMatchCheckCtxt<'p, 'tcx>>) {
// We flatten or-patterns and skip algorithm-generated wildcards.
if pat.is_or_pat() {
self.patterns.extend(
pat.flatten_or_pat().into_iter().filter_map(|pat_or_wild| pat_or_wild.as_pat()),
)
} else if let Some(pat) = pat.as_pat() {
self.patterns.push(pat)
}
}
fn head_ty(&self) -> Option<RevealedTy<'tcx>> {
self.patterns.first().map(|pat| *pat.ty())
}
/// Do constructor splitting on the constructors of the column.
fn analyze_ctors(
&self,
pcx: &PlaceCtxt<'_, 'p, 'tcx>,
) -> Result<SplitConstructorSet<'p, 'tcx>, ErrorGuaranteed> {
let column_ctors = self.patterns.iter().map(|p| p.ctor());
let ctors_for_ty = &pcx.ctors_for_ty()?;
Ok(ctors_for_ty.split(column_ctors))
}
/// Does specialization: given a constructor, this takes the patterns from the column that match
/// the constructor, and outputs their fields.
/// This returns one column per field of the constructor. They usually all have the same length
/// (the number of patterns in `self` that matched `ctor`), except that we expand or-patterns
/// which may change the lengths.
fn specialize(
&self,
pcx: &PlaceCtxt<'_, 'p, 'tcx>,
ctor: &Constructor<'p, 'tcx>,
) -> Vec<PatternColumn<'p, 'tcx>> {
let arity = ctor.arity(pcx);
if arity == 0 {
return Vec::new();
}
// We specialize the column by `ctor`. This gives us `arity`-many columns of patterns. These
// columns may have different lengths in the presence of or-patterns (this is why we can't
// reuse `Matrix`).
let mut specialized_columns: Vec<_> =
(0..arity).map(|_| Self { patterns: Vec::new() }).collect();
let relevant_patterns =
self.patterns.iter().filter(|pat| ctor.is_covered_by(pcx, pat.ctor()));
for pat in relevant_patterns {
let specialized = pat.specialize(ctor, arity);
for (subpat, column) in specialized.into_iter().zip(&mut specialized_columns) {
column.expand_and_push(subpat);
}
}
specialized_columns
}
}
use crate::pat_column::PatternColumn;
use crate::rustc::{RevealedTy, RustcMatchCheckCtxt, WitnessPat};
use crate::MatchArm;
/// Traverse the patterns to collect any variants of a non_exhaustive enum that fail to be mentioned
/// in a given column.
#[instrument(level = "debug", skip(cx), ret)]
fn collect_nonexhaustive_missing_variants<'a, 'p, 'tcx>(
cx: MatchCtxt<'a, 'p, 'tcx>,
column: &PatternColumn<'p, 'tcx>,
cx: &RustcMatchCheckCtxt<'p, 'tcx>,
column: &PatternColumn<'p, RustcMatchCheckCtxt<'p, 'tcx>>,
) -> Result<Vec<WitnessPat<'p, 'tcx>>, ErrorGuaranteed> {
let Some(ty) = column.head_ty() else {
let Some(&ty) = column.head_ty() else {
return Ok(Vec::new());
};
let pcx = &PlaceCtxt::new_dummy(cx, &ty);
let set = column.analyze_ctors(pcx)?;
let set = column.analyze_ctors(cx, &ty)?;
if set.present.is_empty() {
// We can't consistently handle the case where no constructors are present (since this would
// require digging deep through any type in case there's a non_exhaustive enum somewhere),
@ -112,20 +27,20 @@ fn collect_nonexhaustive_missing_variants<'a, 'p, 'tcx>(
}
let mut witnesses = Vec::new();
if cx.tycx.is_foreign_non_exhaustive_enum(ty) {
if cx.is_foreign_non_exhaustive_enum(ty) {
witnesses.extend(
set.missing
.into_iter()
// This will list missing visible variants.
.filter(|c| !matches!(c, Constructor::Hidden | Constructor::NonExhaustive))
.map(|missing_ctor| WitnessPat::wild_from_ctor(pcx, missing_ctor)),
.map(|missing_ctor| WitnessPat::wild_from_ctor(cx, missing_ctor, ty)),
)
}
// Recurse into the fields.
for ctor in set.present {
let specialized_columns = column.specialize(pcx, &ctor);
let wild_pat = WitnessPat::wild_from_ctor(pcx, ctor);
let specialized_columns = column.specialize(cx, &ty, &ctor);
let wild_pat = WitnessPat::wild_from_ctor(cx, ctor, ty);
for (i, col_i) in specialized_columns.iter().enumerate() {
// Compute witnesses for each column.
let wits_for_col_i = collect_nonexhaustive_missing_variants(cx, col_i)?;
@ -141,18 +56,17 @@ fn collect_nonexhaustive_missing_variants<'a, 'p, 'tcx>(
Ok(witnesses)
}
pub(crate) fn lint_nonexhaustive_missing_variants<'a, 'p, 'tcx>(
cx: MatchCtxt<'a, 'p, 'tcx>,
arms: &[MatchArm<'p, 'tcx>],
pat_column: &PatternColumn<'p, 'tcx>,
pub(crate) fn lint_nonexhaustive_missing_variants<'p, 'tcx>(
rcx: &RustcMatchCheckCtxt<'p, 'tcx>,
arms: &[MatchArm<'p, RustcMatchCheckCtxt<'p, 'tcx>>],
pat_column: &PatternColumn<'p, RustcMatchCheckCtxt<'p, 'tcx>>,
scrut_ty: RevealedTy<'tcx>,
) -> Result<(), ErrorGuaranteed> {
let rcx: &RustcMatchCheckCtxt<'_, '_> = cx.tycx;
if !matches!(
rcx.tcx.lint_level_at_node(NON_EXHAUSTIVE_OMITTED_PATTERNS, rcx.match_lint_level).0,
rustc_session::lint::Level::Allow
) {
let witnesses = collect_nonexhaustive_missing_variants(cx, pat_column)?;
let witnesses = collect_nonexhaustive_missing_variants(rcx, pat_column)?;
if !witnesses.is_empty() {
// Report that a match of a `non_exhaustive` enum marked with `non_exhaustive_omitted_patterns`
// is not exhaustive enough.

View file

@ -6,7 +6,6 @@
use smallvec::{smallvec, SmallVec};
use crate::constructor::{Constructor, Slice, SliceKind};
use crate::usefulness::PlaceCtxt;
use crate::{Captures, TypeCx};
use self::Constructor::*;
@ -331,9 +330,9 @@ pub(crate) fn wildcard(ty: Cx::Ty) -> Self {
/// Construct a pattern that matches everything that starts with this constructor.
/// For example, if `ctor` is a `Constructor::Variant` for `Option::Some`, we get the pattern
/// `Some(_)`.
pub(crate) fn wild_from_ctor(pcx: &PlaceCtxt<'_, Cx>, ctor: Constructor<Cx>) -> Self {
let fields = pcx.ctor_sub_tys(&ctor).map(|ty| Self::wildcard(ty)).collect();
Self::new(ctor, fields, pcx.ty.clone())
pub(crate) fn wild_from_ctor(cx: &Cx, ctor: Constructor<Cx>, ty: Cx::Ty) -> Self {
let fields = cx.ctor_sub_tys(&ctor, &ty).map(|ty| Self::wildcard(ty)).collect();
Self::new(ctor, fields, ty)
}
pub fn ctor(&self) -> &Constructor<Cx> {

View file

@ -0,0 +1,90 @@
use crate::constructor::{Constructor, SplitConstructorSet};
use crate::pat::{DeconstructedPat, PatOrWild};
use crate::{Captures, MatchArm, TypeCx};
/// A column of patterns in a match, where a column is the intuitive notion of "subpatterns that
/// inspect the same subvalue/place".
/// This is used to traverse patterns column-by-column for lints. Despite similarities with the
/// algorithm in [`crate::usefulness`], this does a different traversal. Notably this is linear in
/// the depth of patterns, whereas `compute_exhaustiveness_and_usefulness` is worst-case exponential
/// (exhaustiveness is NP-complete). The core difference is that we treat sub-columns separately.
///
/// This is not used in the usefulness algorithm; only in lints.
#[derive(Debug)]
pub struct PatternColumn<'p, Cx: TypeCx> {
/// This must not contain an or-pattern. `expand_and_push` takes care to expand them.
patterns: Vec<&'p DeconstructedPat<'p, Cx>>,
}
impl<'p, Cx: TypeCx> PatternColumn<'p, Cx> {
pub fn new(arms: &[MatchArm<'p, Cx>]) -> Self {
let patterns = Vec::with_capacity(arms.len());
let mut column = PatternColumn { patterns };
for arm in arms {
column.expand_and_push(PatOrWild::Pat(arm.pat));
}
column
}
/// Pushes a pattern onto the column, expanding any or-patterns into its subpatterns.
/// Internal method, prefer [`PatternColumn::new`].
fn expand_and_push(&mut self, pat: PatOrWild<'p, Cx>) {
// We flatten or-patterns and skip algorithm-generated wildcards.
if pat.is_or_pat() {
self.patterns.extend(
pat.flatten_or_pat().into_iter().filter_map(|pat_or_wild| pat_or_wild.as_pat()),
)
} else if let Some(pat) = pat.as_pat() {
self.patterns.push(pat)
}
}
pub fn head_ty(&self) -> Option<&Cx::Ty> {
self.patterns.first().map(|pat| pat.ty())
}
pub fn iter<'a>(&'a self) -> impl Iterator<Item = &'p DeconstructedPat<'p, Cx>> + Captures<'a> {
self.patterns.iter().copied()
}
/// Do constructor splitting on the constructors of the column.
pub fn analyze_ctors(
&self,
cx: &Cx,
ty: &Cx::Ty,
) -> Result<SplitConstructorSet<Cx>, Cx::Error> {
let column_ctors = self.patterns.iter().map(|p| p.ctor());
let ctors_for_ty = cx.ctors_for_ty(ty)?;
Ok(ctors_for_ty.split(column_ctors))
}
/// Does specialization: given a constructor, this takes the patterns from the column that match
/// the constructor, and outputs their fields.
/// This returns one column per field of the constructor. They usually all have the same length
/// (the number of patterns in `self` that matched `ctor`), except that we expand or-patterns
/// which may change the lengths.
pub fn specialize(
&self,
cx: &Cx,
ty: &Cx::Ty,
ctor: &Constructor<Cx>,
) -> Vec<PatternColumn<'p, Cx>> {
let arity = ctor.arity(cx, ty);
if arity == 0 {
return Vec::new();
}
// We specialize the column by `ctor`. This gives us `arity`-many columns of patterns. These
// columns may have different lengths in the presence of or-patterns (this is why we can't
// reuse `Matrix`).
let mut specialized_columns: Vec<_> =
(0..arity).map(|_| Self { patterns: Vec::new() }).collect();
let relevant_patterns =
self.patterns.iter().filter(|pat| ctor.is_covered_by(cx, pat.ctor()));
for pat in relevant_patterns {
let specialized = pat.specialize(ctor, arity);
for (subpat, column) in specialized.into_iter().zip(&mut specialized_columns) {
column.expand_and_push(subpat);
}
}
specialized_columns
}
}

View file

@ -30,11 +30,6 @@
pub type DeconstructedPat<'p, 'tcx> =
crate::pat::DeconstructedPat<'p, RustcMatchCheckCtxt<'p, 'tcx>>;
pub type MatchArm<'p, 'tcx> = crate::MatchArm<'p, RustcMatchCheckCtxt<'p, 'tcx>>;
pub type MatchCtxt<'a, 'p, 'tcx> = crate::MatchCtxt<'a, RustcMatchCheckCtxt<'p, 'tcx>>;
pub(crate) type PlaceCtxt<'a, 'p, 'tcx> =
crate::usefulness::PlaceCtxt<'a, RustcMatchCheckCtxt<'p, 'tcx>>;
pub(crate) type SplitConstructorSet<'p, 'tcx> =
crate::constructor::SplitConstructorSet<RustcMatchCheckCtxt<'p, 'tcx>>;
pub type Usefulness<'p, 'tcx> = crate::usefulness::Usefulness<'p, RustcMatchCheckCtxt<'p, 'tcx>>;
pub type UsefulnessReport<'p, 'tcx> =
crate::usefulness::UsefulnessReport<'p, RustcMatchCheckCtxt<'p, 'tcx>>;

View file

@ -719,7 +719,7 @@
use crate::constructor::{Constructor, ConstructorSet, IntRange};
use crate::pat::{DeconstructedPat, PatOrWild, WitnessPat};
use crate::{Captures, MatchArm, MatchCtxt, TypeCx};
use crate::{Captures, MatchArm, TypeCx};
use self::ValidityConstraint::*;
@ -730,20 +730,32 @@ pub fn ensure_sufficient_stack<R>(f: impl FnOnce() -> R) -> R {
f()
}
/// Context that provides information local to a place under investigation.
pub(crate) struct PlaceCtxt<'a, Cx: TypeCx> {
pub(crate) mcx: MatchCtxt<'a, Cx>,
/// Type of the place under investigation.
pub(crate) ty: &'a Cx::Ty,
/// Context that provides information for usefulness checking.
pub struct UsefulnessCtxt<'a, Cx: TypeCx> {
/// The context for type information.
pub tycx: &'a Cx,
}
impl<'a, Cx: TypeCx> Clone for PlaceCtxt<'a, Cx> {
impl<'a, Cx: TypeCx> Copy for UsefulnessCtxt<'a, Cx> {}
impl<'a, Cx: TypeCx> Clone for UsefulnessCtxt<'a, Cx> {
fn clone(&self) -> Self {
Self { mcx: self.mcx, ty: self.ty }
Self { tycx: self.tycx }
}
}
/// Context that provides information local to a place under investigation.
struct PlaceCtxt<'a, Cx: TypeCx> {
cx: &'a Cx,
/// Type of the place under investigation.
ty: &'a Cx::Ty,
}
impl<'a, Cx: TypeCx> Copy for PlaceCtxt<'a, Cx> {}
impl<'a, Cx: TypeCx> Clone for PlaceCtxt<'a, Cx> {
fn clone(&self) -> Self {
Self { cx: self.cx, ty: self.ty }
}
}
impl<'a, Cx: TypeCx> fmt::Debug for PlaceCtxt<'a, Cx> {
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
@ -752,23 +764,20 @@ fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
}
impl<'a, Cx: TypeCx> PlaceCtxt<'a, Cx> {
/// A `PlaceCtxt` when code other than `is_useful` needs one.
#[cfg_attr(not(feature = "rustc"), allow(dead_code))]
pub(crate) fn new_dummy(mcx: MatchCtxt<'a, Cx>, ty: &'a Cx::Ty) -> Self {
PlaceCtxt { mcx, ty }
fn ctor_arity(&self, ctor: &Constructor<Cx>) -> usize {
self.cx.ctor_arity(ctor, self.ty)
}
pub(crate) fn ctor_arity(&self, ctor: &Constructor<Cx>) -> usize {
self.mcx.tycx.ctor_arity(ctor, self.ty)
}
pub(crate) fn ctor_sub_tys(
fn ctor_sub_tys(
&'a self,
ctor: &'a Constructor<Cx>,
) -> impl Iterator<Item = Cx::Ty> + ExactSizeIterator + Captures<'a> {
self.mcx.tycx.ctor_sub_tys(ctor, self.ty)
self.cx.ctor_sub_tys(ctor, self.ty)
}
pub(crate) fn ctors_for_ty(&self) -> Result<ConstructorSet<Cx>, Cx::Error> {
self.mcx.tycx.ctors_for_ty(self.ty)
fn ctors_for_ty(&self) -> Result<ConstructorSet<Cx>, Cx::Error> {
self.cx.ctors_for_ty(self.ty)
}
fn wild_from_ctor(&self, ctor: Constructor<Cx>) -> WitnessPat<Cx> {
WitnessPat::wild_from_ctor(self.cx, ctor, self.ty.clone())
}
}
@ -1089,7 +1098,7 @@ fn specialize_constructor(
wildcard_row_is_relevant: self.wildcard_row_is_relevant && ctor_is_relevant,
};
for (i, row) in self.rows().enumerate() {
if ctor.is_covered_by(pcx, row.head().ctor()) {
if ctor.is_covered_by(pcx.cx, row.head().ctor()) {
let new_row = row.pop_head_constructor(ctor, arity, ctor_is_relevant, i);
matrix.expand_and_push(new_row);
}
@ -1240,7 +1249,7 @@ fn push_pattern(&mut self, pat: WitnessPat<Cx>) {
/// ```
fn apply_constructor(&mut self, pcx: &PlaceCtxt<'_, Cx>, ctor: &Constructor<Cx>) {
let len = self.0.len();
let arity = ctor.arity(pcx);
let arity = pcx.ctor_arity(ctor);
let fields = self.0.drain((len - arity)..).rev().collect();
let pat = WitnessPat::new(ctor.clone(), fields, pcx.ty.clone());
self.0.push(pat);
@ -1315,20 +1324,20 @@ fn apply_constructor(
*self = Self::empty();
} else if !report_individual_missing_ctors {
// Report `_` as missing.
let pat = WitnessPat::wild_from_ctor(pcx, Constructor::Wildcard);
let pat = pcx.wild_from_ctor(Constructor::Wildcard);
self.push_pattern(pat);
} else if missing_ctors.iter().any(|c| c.is_non_exhaustive()) {
// We need to report a `_` anyway, so listing other constructors would be redundant.
// `NonExhaustive` is displayed as `_` just like `Wildcard`, but it will be picked
// up by diagnostics to add a note about why `_` is required here.
let pat = WitnessPat::wild_from_ctor(pcx, Constructor::NonExhaustive);
let pat = pcx.wild_from_ctor(Constructor::NonExhaustive);
self.push_pattern(pat);
} else {
// For each missing constructor `c`, we add a `c(_, _, _)` witness appropriately
// filled with wildcards.
let mut ret = Self::empty();
for ctor in missing_ctors {
let pat = WitnessPat::wild_from_ctor(pcx, ctor.clone());
let pat = pcx.wild_from_ctor(ctor.clone());
// Clone `self` and add `c(_, _, _)` to each of its witnesses.
let mut wit_matrix = self.clone();
wit_matrix.push_pattern(pat);
@ -1362,7 +1371,7 @@ fn extend(&mut self, other: Self) {
/// We can however get false negatives because exhaustiveness does not explore all cases. See the
/// section on relevancy at the top of the file.
fn collect_overlapping_range_endpoints<'p, Cx: TypeCx>(
mcx: MatchCtxt<'_, Cx>,
mcx: UsefulnessCtxt<'_, Cx>,
overlap_range: IntRange,
matrix: &Matrix<'p, Cx>,
specialized_matrix: &Matrix<'p, Cx>,
@ -1435,7 +1444,7 @@ fn collect_overlapping_range_endpoints<'p, Cx: TypeCx>(
/// This is all explained at the top of the file.
#[instrument(level = "debug", skip(mcx, is_top_level), ret)]
fn compute_exhaustiveness_and_usefulness<'a, 'p, Cx: TypeCx>(
mcx: MatchCtxt<'a, Cx>,
mcx: UsefulnessCtxt<'a, Cx>,
matrix: &mut Matrix<'p, Cx>,
is_top_level: bool,
) -> Result<WitnessMatrix<Cx>, Cx::Error> {
@ -1469,7 +1478,7 @@ fn compute_exhaustiveness_and_usefulness<'a, 'p, Cx: TypeCx>(
};
debug!("ty: {ty:?}");
let pcx = &PlaceCtxt { mcx, ty: &ty };
let pcx = &PlaceCtxt { cx: mcx.tycx, ty: &ty };
let ctors_for_ty = pcx.ctors_for_ty()?;
// Whether the place/column we are inspecting is known to contain valid data.
@ -1592,13 +1601,14 @@ pub struct UsefulnessReport<'p, Cx: TypeCx> {
}
/// Computes whether a match is exhaustive and which of its arms are useful.
#[instrument(skip(cx, arms), level = "debug")]
#[instrument(skip(tycx, arms), level = "debug")]
pub fn compute_match_usefulness<'p, Cx: TypeCx>(
cx: MatchCtxt<'_, Cx>,
tycx: &Cx,
arms: &[MatchArm<'p, Cx>],
scrut_ty: Cx::Ty,
scrut_validity: ValidityConstraint,
) -> Result<UsefulnessReport<'p, Cx>, Cx::Error> {
let cx = UsefulnessCtxt { tycx };
let mut matrix = Matrix::new(arms, scrut_ty, scrut_validity);
let non_exhaustiveness_witnesses =
compute_exhaustiveness_and_usefulness(cx, &mut matrix, true)?;

View file

@ -449,7 +449,6 @@ fn internal<'tcx>(&self, _tables: &mut Tables<'_>, _tcx: TyCtxt<'tcx>) -> Self::
Abi::PtxKernel => rustc_target::spec::abi::Abi::PtxKernel,
Abi::Msp430Interrupt => rustc_target::spec::abi::Abi::Msp430Interrupt,
Abi::X86Interrupt => rustc_target::spec::abi::Abi::X86Interrupt,
Abi::AmdGpuKernel => rustc_target::spec::abi::Abi::AmdGpuKernel,
Abi::EfiApi => rustc_target::spec::abi::Abi::EfiApi,
Abi::AvrInterrupt => rustc_target::spec::abi::Abi::AvrInterrupt,
Abi::AvrNonBlockingInterrupt => rustc_target::spec::abi::Abi::AvrNonBlockingInterrupt,

View file

@ -111,7 +111,6 @@ fn stable(&self, _tables: &mut Tables<'_>) -> Self::T {
Conv::X86VectorCall => CallConvention::X86VectorCall,
Conv::X86_64SysV => CallConvention::X86_64SysV,
Conv::X86_64Win64 => CallConvention::X86_64Win64,
Conv::AmdGpuKernel => CallConvention::AmdGpuKernel,
Conv::AvrInterrupt => CallConvention::AvrInterrupt,
Conv::AvrNonBlockingInterrupt => CallConvention::AvrNonBlockingInterrupt,
Conv::RiscvInterrupt { .. } => CallConvention::RiscvInterrupt,

View file

@ -223,7 +223,6 @@ fn stable(&self, tables: &mut Tables<'_>) -> Self::T {
abi::Abi::PtxKernel => Abi::PtxKernel,
abi::Abi::Msp430Interrupt => Abi::Msp430Interrupt,
abi::Abi::X86Interrupt => Abi::X86Interrupt,
abi::Abi::AmdGpuKernel => Abi::AmdGpuKernel,
abi::Abi::EfiApi => Abi::EfiApi,
abi::Abi::AvrInterrupt => Abi::AvrInterrupt,
abi::Abi::AvrNonBlockingInterrupt => Abi::AvrNonBlockingInterrupt,

View file

@ -705,7 +705,6 @@ pub enum Conv {
X86_64SysV,
X86_64Win64,
AmdGpuKernel,
AvrInterrupt,
AvrNonBlockingInterrupt,
@ -887,7 +886,6 @@ fn from_str(s: &str) -> Result<Self, Self::Err> {
"X86VectorCall" => Ok(Conv::X86VectorCall),
"X86_64SysV" => Ok(Conv::X86_64SysV),
"X86_64Win64" => Ok(Conv::X86_64Win64),
"AmdGpuKernel" => Ok(Conv::AmdGpuKernel),
"AvrInterrupt" => Ok(Conv::AvrInterrupt),
"AvrNonBlockingInterrupt" => Ok(Conv::AvrNonBlockingInterrupt),
"RiscvInterrupt(machine)" => {

View file

@ -110,7 +110,6 @@ fn to_json(&self) -> Json {
Self::X86VectorCall => "X86VectorCall",
Self::X86_64SysV => "X86_64SysV",
Self::X86_64Win64 => "X86_64Win64",
Self::AmdGpuKernel => "AmdGpuKernel",
Self::AvrInterrupt => "AvrInterrupt",
Self::AvrNonBlockingInterrupt => "AvrNonBlockingInterrupt",
Self::RiscvInterrupt { kind } => {

View file

@ -44,7 +44,6 @@ pub enum Abi {
PtxKernel,
Msp430Interrupt,
X86Interrupt,
AmdGpuKernel,
EfiApi,
AvrInterrupt,
AvrNonBlockingInterrupt,
@ -121,7 +120,6 @@ pub struct AbiData {
AbiData { abi: Abi::PtxKernel, name: "ptx-kernel" },
AbiData { abi: Abi::Msp430Interrupt, name: "msp430-interrupt" },
AbiData { abi: Abi::X86Interrupt, name: "x86-interrupt" },
AbiData { abi: Abi::AmdGpuKernel, name: "amdgpu-kernel" },
AbiData { abi: Abi::EfiApi, name: "efiapi" },
AbiData { abi: Abi::AvrInterrupt, name: "avr-interrupt" },
AbiData { abi: Abi::AvrNonBlockingInterrupt, name: "avr-non-blocking-interrupt" },
@ -237,10 +235,6 @@ pub fn is_stable(name: &str) -> Result<(), AbiDisabled> {
feature: sym::abi_x86_interrupt,
explain: "x86-interrupt ABI is experimental and subject to change",
}),
"amdgpu-kernel" => Err(AbiDisabled::Unstable {
feature: sym::abi_amdgpu_kernel,
explain: "amdgpu-kernel ABI is experimental and subject to change",
}),
"avr-interrupt" | "avr-non-blocking-interrupt" => Err(AbiDisabled::Unstable {
feature: sym::abi_avr_interrupt,
explain: "avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change",
@ -295,22 +289,21 @@ pub fn index(self) -> usize {
PtxKernel => 19,
Msp430Interrupt => 20,
X86Interrupt => 21,
AmdGpuKernel => 22,
EfiApi => 23,
AvrInterrupt => 24,
AvrNonBlockingInterrupt => 25,
CCmseNonSecureCall => 26,
Wasm => 27,
EfiApi => 22,
AvrInterrupt => 23,
AvrNonBlockingInterrupt => 24,
CCmseNonSecureCall => 25,
Wasm => 26,
// Cross-platform ABIs
System { unwind: false } => 28,
System { unwind: true } => 29,
RustIntrinsic => 30,
RustCall => 31,
PlatformIntrinsic => 32,
Unadjusted => 33,
RustCold => 34,
RiscvInterruptM => 35,
RiscvInterruptS => 36,
System { unwind: false } => 27,
System { unwind: true } => 28,
RustIntrinsic => 29,
RustCall => 30,
PlatformIntrinsic => 31,
Unadjusted => 32,
RustCold => 33,
RiscvInterruptM => 34,
RiscvInterruptS => 35,
};
debug_assert!(
AbiDatas

View file

@ -2457,7 +2457,6 @@ pub fn is_abi_supported(&self, abi: Abi) -> Option<bool> {
Win64 { .. } | SysV64 { .. } => self.arch == "x86_64",
PtxKernel => self.arch == "nvptx64",
Msp430Interrupt => self.arch == "msp430",
AmdGpuKernel => self.arch == "amdgcn",
RiscvInterruptM | RiscvInterruptS => ["riscv32", "riscv64"].contains(&&self.arch[..]),
AvrInterrupt | AvrNonBlockingInterrupt => self.arch == "avr",
Wasm => ["wasm32", "wasm64"].contains(&&self.arch[..]),

View file

@ -1432,20 +1432,18 @@ fn suggest_add_reference_to_arg(
) -> bool {
let span = obligation.cause.span;
let code = if let ObligationCauseCode::FunctionArgumentObligation { parent_code, .. } =
obligation.cause.code()
{
parent_code
} else if let ObligationCauseCode::ItemObligation(_)
| ObligationCauseCode::ExprItemObligation(..) = obligation.cause.code()
{
obligation.cause.code()
} else if let ExpnKind::Desugaring(DesugaringKind::ForLoop) =
span.ctxt().outer_expn_data().kind
{
obligation.cause.code()
} else {
return false;
let code = match obligation.cause.code() {
ObligationCauseCode::FunctionArgumentObligation { parent_code, .. } => parent_code,
c @ ObligationCauseCode::ItemObligation(_)
| c @ ObligationCauseCode::ExprItemObligation(..) => c,
c if matches!(
span.ctxt().outer_expn_data().kind,
ExpnKind::Desugaring(DesugaringKind::ForLoop)
) =>
{
c
}
_ => return false,
};
// List of traits for which it would be nonsensical to suggest borrowing.
@ -4978,16 +4976,27 @@ pub(super) fn get_explanation_based_on_obligation<'tcx>(
_ => None,
};
let pred = obligation.predicate;
let (_, base) = obligation.cause.code().peel_derives_with_predicate();
let post = if let ty::PredicateKind::Clause(clause) = pred.kind().skip_binder()
&& let ty::ClauseKind::Trait(pred) = clause
&& let Some(base) = base
&& base.skip_binder() != pred
{
format!(", which is required by `{base}`")
} else {
String::new()
};
match ty_desc {
Some(desc) => format!(
"{}the trait `{}` is not implemented for {} `{}`",
"{}the trait `{}` is not implemented for {} `{}`{post}",
pre_message,
trait_predicate.print_modifiers_and_trait_path(),
desc,
tcx.short_ty_string(trait_ref.skip_binder().self_ty(), &mut None),
),
None => format!(
"{}the trait `{}` is not implemented for `{}`",
"{}the trait `{}` is not implemented for `{}`{post}",
pre_message,
trait_predicate.print_modifiers_and_trait_path(),
tcx.short_ty_string(trait_ref.skip_binder().self_ty(), &mut None),

View file

@ -258,7 +258,6 @@ fn conv_from_spec_abi(tcx: TyCtxt<'_>, abi: SpecAbi, c_variadic: bool) -> Conv {
PtxKernel => Conv::PtxKernel,
Msp430Interrupt => Conv::Msp430Intr,
X86Interrupt => Conv::X86Intr,
AmdGpuKernel => Conv::AmdGpuKernel,
AvrInterrupt => Conv::AvrInterrupt,
AvrNonBlockingInterrupt => Conv::AvrNonBlockingInterrupt,
RiscvInterruptM => Conv::RiscvInterrupt { kind: RiscvInterruptKind::Machine },

View file

@ -275,7 +275,6 @@ pub enum CallConvention {
X86_64SysV,
X86_64Win64,
AmdGpuKernel,
AvrInterrupt,
AvrNonBlockingInterrupt,

View file

@ -864,7 +864,6 @@ pub enum Abi {
PtxKernel,
Msp430Interrupt,
X86Interrupt,
AmdGpuKernel,
EfiApi,
AvrInterrupt,
AvrNonBlockingInterrupt,

View file

@ -2784,6 +2784,50 @@ fn index_mut(&mut self, index: I) -> &mut Self::Output {
}
}
/// Collects an iterator into a Vec, commonly called via [`Iterator::collect()`]
///
/// # Allocation behavior
///
/// In general `Vec` does not guarantee any particular growth or allocation strategy.
/// That also applies to this trait impl.
///
/// **Note:** This section covers implementation details and is therefore exempt from
/// stability guarantees.
///
/// Vec may use any or none of the following strategies,
/// depending on the supplied iterator:
///
/// * preallocate based on [`Iterator::size_hint()`]
/// * and panic if the number of items is outside the provided lower/upper bounds
/// * use an amortized growth strategy similar to `pushing` one item at a time
/// * perform the iteration in-place on the original allocation backing the iterator
///
/// The last case warrants some attention. It is an optimization that in many cases reduces peak memory
/// consumption and improves cache locality. But when big, short-lived allocations are created,
/// only a small fraction of their items get collected, no further use is made of the spare capacity
/// and the resulting `Vec` is moved into a longer-lived structure, then this can lead to the large
/// allocations having their lifetimes unnecessarily extended which can result in increased memory
/// footprint.
///
/// In cases where this is an issue, the excess capacity can be discarded with [`Vec::shrink_to()`],
/// [`Vec::shrink_to_fit()`] or by collecting into [`Box<[T]>`][owned slice] instead, which additionally reduces
/// the size of the long-lived struct.
///
/// [owned slice]: Box
///
/// ```rust
/// # use std::sync::Mutex;
/// static LONG_LIVED: Mutex<Vec<Vec<u16>>> = Mutex::new(Vec::new());
///
/// for i in 0..10 {
/// let big_temporary: Vec<u16> = (0..1024).collect();
/// // discard most items
/// let mut result: Vec<_> = big_temporary.into_iter().filter(|i| i % 100 == 0).collect();
/// // without this a lot of unused capacity might be moved into the global
/// result.shrink_to_fit();
/// LONG_LIVED.lock().unwrap().push(result);
/// }
/// ```
#[cfg(not(no_global_oom_handling))]
#[stable(feature = "rust1", since = "1.0.0")]
impl<T> FromIterator<T> for Vec<T> {

View file

@ -18,7 +18,6 @@
target_os = "fuchsia",
target_os = "redox",
target_os = "hurd",
target_os = "freebsd",
target_os = "netbsd",
target_os = "dragonfly"
))]
@ -118,7 +117,8 @@ pub unsafe fn register_dtor(t: *mut u8, dtor: unsafe extern "C" fn(*mut u8)) {
target_os = "vxworks",
target_os = "horizon",
target_os = "emscripten",
target_os = "aix"
target_os = "aix",
target_os = "freebsd",
))]
#[cfg_attr(target_family = "wasm", allow(unused))] // might remain unused depending on target details (e.g. wasm32-unknown-emscripten)
pub unsafe fn register_dtor(t: *mut u8, dtor: unsafe extern "C" fn(*mut u8)) {

View file

@ -174,12 +174,14 @@ fn override_toml_duplicate() {
#[test]
fn profile_user_dist() {
fn get_toml(file: &Path) -> TomlConfig {
let contents = if file.ends_with("config.toml") {
"profile = \"user\"".to_owned()
} else {
assert!(file.ends_with("config.dist.toml"));
std::fs::read_to_string(file).unwrap()
};
let contents =
if file.ends_with("config.toml") || env::var_os("RUST_BOOTSTRAP_CONFIG").is_some() {
"profile = \"user\"".to_owned()
} else {
assert!(file.ends_with("config.dist.toml"));
std::fs::read_to_string(file).unwrap()
};
toml::from_str(&contents)
.and_then(|table: toml::Value| TomlConfig::deserialize(table))
.unwrap()

View file

@ -148,6 +148,17 @@ pub(crate) fn clean_doc_module<'tcx>(doc: &DocModule<'tcx>, cx: &mut DocContext<
)
}
fn is_glob_import(tcx: TyCtxt<'_>, import_id: LocalDefId) -> bool {
if let Some(node) = tcx.opt_hir_node_by_def_id(import_id)
&& let hir::Node::Item(item) = node
&& let hir::ItemKind::Use(_, use_kind) = item.kind
{
use_kind == hir::UseKind::Glob
} else {
false
}
}
fn generate_item_with_correct_attrs(
cx: &mut DocContext<'_>,
kind: ItemKind,
@ -158,10 +169,17 @@ fn generate_item_with_correct_attrs(
) -> Item {
let target_attrs = inline::load_attrs(cx, def_id);
let attrs = if let Some(import_id) = import_id {
// glob reexports are treated the same as `#[doc(inline)]` items.
//
// For glob re-exports the item may or may not exist to be re-exported (potentially the cfgs
// on the path up until the glob can be removed, and only cfgs on the globbed item itself
// matter), for non-inlined re-exports see #85043.
let is_inline = inline::load_attrs(cx, import_id.to_def_id())
.lists(sym::doc)
.get_word_attr(sym::inline)
.is_some();
.is_some()
|| (is_glob_import(cx.tcx, import_id)
&& (cx.render_options.document_hidden || !cx.tcx.is_doc_hidden(def_id)));
let mut attrs = get_all_import_attributes(cx, import_id, def_id, is_inline);
add_without_unwanted_attributes(&mut attrs, target_attrs, is_inline, None);
attrs

View file

@ -74,6 +74,7 @@ mod multiple_conflicting_traits {
impl S {
fn foo() {}
//~^ ERROR: method's name is the same as an existing method in a trait
//~| ERROR: method's name is the same as an existing method in a trait
}
impl T1 for S {}

View file

@ -56,10 +56,22 @@ LL | fn foo() {}
| ^^^^^^^^^^^
|
note: existing `foo` defined here
--> $DIR/same_name_method.rs:79:9
--> $DIR/same_name_method.rs:80:9
|
LL | impl T1 for S {}
| ^^^^^^^^^^^^^^^^
error: aborting due to 5 previous errors
error: method's name is the same as an existing method in a trait
--> $DIR/same_name_method.rs:75:13
|
LL | fn foo() {}
| ^^^^^^^^^^^
|
note: existing `foo` defined here
--> $DIR/same_name_method.rs:82:9
|
LL | impl T2 for S {}
| ^^^^^^^^^^^^^^^^
error: aborting due to 6 previous errors

View file

@ -302,7 +302,6 @@ LL | | /// level changes.
= help: if you meant to use a literal backtick, escape it
change: or `None` if it isn't.
to this: or `None\` if it isn't.
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error: unescaped backtick
--> $DIR/unescaped_backticks.rs:323:5
@ -322,7 +321,6 @@ LL | | /// level changes.
= help: if you meant to use a literal backtick, escape it
change: `on_event` should be called.
to this: `on_event\` should be called.
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error: unescaped backtick
--> $DIR/unescaped_backticks.rs:323:5
@ -342,7 +340,6 @@ LL | | /// level changes.
= help: if you meant to use a literal backtick, escape it
change: [`rebuild_interest_cache`][rebuild] is called after the value of the max
to this: [`rebuild_interest_cache\`][rebuild] is called after the value of the max
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error: unescaped backtick
--> $DIR/unescaped_backticks.rs:349:56

View file

@ -0,0 +1,32 @@
// This test ensures that non-glob reexports don't get their attributes merge with
// the reexported item whereas glob reexports do.
// Regression test for <https://github.com/rust-lang/rust/issues/120487>.
#![crate_name = "foo"]
#![feature(doc_cfg)]
// @has 'foo/index.html'
// There are two items.
// @count - '//*[@class="item-table"]//div[@class="item-name"]' 2
// Only one of them should have an attribute.
// @count - '//*[@class="item-table"]//div[@class="item-name"]/*[@class="stab portability"]' 1
mod a {
#[doc(cfg(not(feature = "a")))]
#[cfg(not(feature = "a"))]
pub struct Test1;
}
mod b {
#[doc(cfg(not(feature = "a")))]
#[cfg(not(feature = "a"))]
pub struct Test2;
}
// @has 'foo/struct.Test1.html'
// @count - '//*[@id="main-content"]/*[@class="item-info"]' 1
// @has - '//*[@id="main-content"]/*[@class="item-info"]' 'Available on non-crate feature a only.'
pub use a::*;
// @has 'foo/struct.Test2.html'
// @count - '//*[@id="main-content"]/*[@class="item-info"]' 0
pub use b::Test2;

View file

@ -1,59 +1,53 @@
error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:30:1
--> $DIR/unsupported.rs:29:1
|
LL | extern "ptx-kernel" fn ptx() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"amdgpu-kernel"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:32:1
|
LL | extern "amdgpu-kernel" fn amdgpu() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"wasm"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:34:1
--> $DIR/unsupported.rs:31:1
|
LL | extern "wasm" fn wasm() {}
| ^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"aapcs"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:36:1
--> $DIR/unsupported.rs:33:1
|
LL | extern "aapcs" fn aapcs() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:42:1
--> $DIR/unsupported.rs:39:1
|
LL | extern "msp430-interrupt" fn msp430() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:44:1
--> $DIR/unsupported.rs:41:1
|
LL | extern "avr-interrupt" fn avr() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:46:1
--> $DIR/unsupported.rs:43:1
|
LL | extern "riscv-interrupt-m" fn riscv() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"x86-interrupt"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:51:1
--> $DIR/unsupported.rs:48:1
|
LL | extern "x86-interrupt" fn x86() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"thiscall"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:56:1
--> $DIR/unsupported.rs:53:1
|
LL | extern "thiscall" fn thiscall() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:62:1
--> $DIR/unsupported.rs:59:1
|
LL | extern "stdcall" fn stdcall() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -62,6 +56,6 @@ LL | extern "stdcall" fn stdcall() {}
= note: for more information, see issue #87678 <https://github.com/rust-lang/rust/issues/87678>
= note: `#[warn(unsupported_calling_conventions)]` on by default
error: aborting due to 9 previous errors; 1 warning emitted
error: aborting due to 8 previous errors; 1 warning emitted
For more information about this error, try `rustc --explain E0570`.

View file

@ -1,53 +1,47 @@
error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:30:1
--> $DIR/unsupported.rs:29:1
|
LL | extern "ptx-kernel" fn ptx() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"amdgpu-kernel"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:32:1
|
LL | extern "amdgpu-kernel" fn amdgpu() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"wasm"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:34:1
--> $DIR/unsupported.rs:31:1
|
LL | extern "wasm" fn wasm() {}
| ^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:42:1
--> $DIR/unsupported.rs:39:1
|
LL | extern "msp430-interrupt" fn msp430() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:44:1
--> $DIR/unsupported.rs:41:1
|
LL | extern "avr-interrupt" fn avr() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:46:1
--> $DIR/unsupported.rs:43:1
|
LL | extern "riscv-interrupt-m" fn riscv() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"x86-interrupt"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:51:1
--> $DIR/unsupported.rs:48:1
|
LL | extern "x86-interrupt" fn x86() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"thiscall"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:56:1
--> $DIR/unsupported.rs:53:1
|
LL | extern "thiscall" fn thiscall() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:62:1
--> $DIR/unsupported.rs:59:1
|
LL | extern "stdcall" fn stdcall() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -56,6 +50,6 @@ LL | extern "stdcall" fn stdcall() {}
= note: for more information, see issue #87678 <https://github.com/rust-lang/rust/issues/87678>
= note: `#[warn(unsupported_calling_conventions)]` on by default
error: aborting due to 8 previous errors; 1 warning emitted
error: aborting due to 7 previous errors; 1 warning emitted
For more information about this error, try `rustc --explain E0570`.

View file

@ -1,45 +1,39 @@
error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:30:1
--> $DIR/unsupported.rs:29:1
|
LL | extern "ptx-kernel" fn ptx() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"amdgpu-kernel"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:32:1
|
LL | extern "amdgpu-kernel" fn amdgpu() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"wasm"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:34:1
--> $DIR/unsupported.rs:31:1
|
LL | extern "wasm" fn wasm() {}
| ^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"aapcs"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:36:1
--> $DIR/unsupported.rs:33:1
|
LL | extern "aapcs" fn aapcs() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:42:1
--> $DIR/unsupported.rs:39:1
|
LL | extern "msp430-interrupt" fn msp430() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:44:1
--> $DIR/unsupported.rs:41:1
|
LL | extern "avr-interrupt" fn avr() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:46:1
--> $DIR/unsupported.rs:43:1
|
LL | extern "riscv-interrupt-m" fn riscv() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 7 previous errors
error: aborting due to 6 previous errors
For more information about this error, try `rustc --explain E0570`.

View file

@ -1,53 +1,47 @@
error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:30:1
--> $DIR/unsupported.rs:29:1
|
LL | extern "ptx-kernel" fn ptx() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"amdgpu-kernel"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:32:1
|
LL | extern "amdgpu-kernel" fn amdgpu() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"wasm"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:34:1
--> $DIR/unsupported.rs:31:1
|
LL | extern "wasm" fn wasm() {}
| ^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"aapcs"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:36:1
--> $DIR/unsupported.rs:33:1
|
LL | extern "aapcs" fn aapcs() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:42:1
--> $DIR/unsupported.rs:39:1
|
LL | extern "msp430-interrupt" fn msp430() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:44:1
--> $DIR/unsupported.rs:41:1
|
LL | extern "avr-interrupt" fn avr() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"x86-interrupt"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:51:1
--> $DIR/unsupported.rs:48:1
|
LL | extern "x86-interrupt" fn x86() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"thiscall"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:56:1
--> $DIR/unsupported.rs:53:1
|
LL | extern "thiscall" fn thiscall() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:62:1
--> $DIR/unsupported.rs:59:1
|
LL | extern "stdcall" fn stdcall() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -56,6 +50,6 @@ LL | extern "stdcall" fn stdcall() {}
= note: for more information, see issue #87678 <https://github.com/rust-lang/rust/issues/87678>
= note: `#[warn(unsupported_calling_conventions)]` on by default
error: aborting due to 8 previous errors; 1 warning emitted
error: aborting due to 7 previous errors; 1 warning emitted
For more information about this error, try `rustc --explain E0570`.

View file

@ -1,53 +1,47 @@
error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:30:1
--> $DIR/unsupported.rs:29:1
|
LL | extern "ptx-kernel" fn ptx() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"amdgpu-kernel"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:32:1
|
LL | extern "amdgpu-kernel" fn amdgpu() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"wasm"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:34:1
--> $DIR/unsupported.rs:31:1
|
LL | extern "wasm" fn wasm() {}
| ^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"aapcs"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:36:1
--> $DIR/unsupported.rs:33:1
|
LL | extern "aapcs" fn aapcs() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:42:1
--> $DIR/unsupported.rs:39:1
|
LL | extern "msp430-interrupt" fn msp430() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:44:1
--> $DIR/unsupported.rs:41:1
|
LL | extern "avr-interrupt" fn avr() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"x86-interrupt"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:51:1
--> $DIR/unsupported.rs:48:1
|
LL | extern "x86-interrupt" fn x86() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"thiscall"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:56:1
--> $DIR/unsupported.rs:53:1
|
LL | extern "thiscall" fn thiscall() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:62:1
--> $DIR/unsupported.rs:59:1
|
LL | extern "stdcall" fn stdcall() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -56,6 +50,6 @@ LL | extern "stdcall" fn stdcall() {}
= note: for more information, see issue #87678 <https://github.com/rust-lang/rust/issues/87678>
= note: `#[warn(unsupported_calling_conventions)]` on by default
error: aborting due to 8 previous errors; 1 warning emitted
error: aborting due to 7 previous errors; 1 warning emitted
For more information about this error, try `rustc --explain E0570`.

View file

@ -19,7 +19,6 @@
abi_ptx,
abi_msp430_interrupt,
abi_avr_interrupt,
abi_amdgpu_kernel,
wasm_abi,
abi_x86_interrupt,
abi_riscv_interrupt
@ -29,8 +28,6 @@ trait Sized {}
extern "ptx-kernel" fn ptx() {}
//~^ ERROR is not a supported ABI
extern "amdgpu-kernel" fn amdgpu() {}
//~^ ERROR is not a supported ABI
extern "wasm" fn wasm() {}
//~^ ERROR is not a supported ABI
extern "aapcs" fn aapcs() {}

View file

@ -1,53 +1,47 @@
error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:30:1
--> $DIR/unsupported.rs:29:1
|
LL | extern "ptx-kernel" fn ptx() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"amdgpu-kernel"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:32:1
|
LL | extern "amdgpu-kernel" fn amdgpu() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"wasm"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:34:1
--> $DIR/unsupported.rs:31:1
|
LL | extern "wasm" fn wasm() {}
| ^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"aapcs"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:36:1
--> $DIR/unsupported.rs:33:1
|
LL | extern "aapcs" fn aapcs() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:42:1
--> $DIR/unsupported.rs:39:1
|
LL | extern "msp430-interrupt" fn msp430() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:44:1
--> $DIR/unsupported.rs:41:1
|
LL | extern "avr-interrupt" fn avr() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:46:1
--> $DIR/unsupported.rs:43:1
|
LL | extern "riscv-interrupt-m" fn riscv() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"thiscall"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:56:1
--> $DIR/unsupported.rs:53:1
|
LL | extern "thiscall" fn thiscall() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:62:1
--> $DIR/unsupported.rs:59:1
|
LL | extern "stdcall" fn stdcall() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -56,6 +50,6 @@ LL | extern "stdcall" fn stdcall() {}
= note: for more information, see issue #87678 <https://github.com/rust-lang/rust/issues/87678>
= note: `#[warn(unsupported_calling_conventions)]` on by default
error: aborting due to 8 previous errors; 1 warning emitted
error: aborting due to 7 previous errors; 1 warning emitted
For more information about this error, try `rustc --explain E0570`.

View file

@ -13,7 +13,7 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation
LL | fn new(slice: &[u8; Self::SIZE]) -> Self {
| ^^^^ doesn't have a size known at compile-time
|
= help: within `Bar<[u8]>`, the trait `Sized` is not implemented for `[u8]`
= help: within `Bar<[u8]>`, the trait `Sized` is not implemented for `[u8]`, which is required by `Bar<[u8]>: Sized`
note: required because it appears within the type `Bar<[u8]>`
--> $DIR/issue-58022.rs:8:12
|

View file

@ -13,7 +13,7 @@ error: future cannot be sent between threads safely
LL | is_send(foo::<T>());
| ^^^^^^^^^^ future returned by `foo` is not `Send`
|
= help: within `impl Future<Output = Result<(), ()>>`, the trait `Send` is not implemented for `impl Future<Output = Result<(), ()>> { <T as Foo>::method() }`
= help: within `impl Future<Output = Result<(), ()>>`, the trait `Send` is not implemented for `impl Future<Output = Result<(), ()>> { <T as Foo>::method() }`, which is required by `impl Future<Output = Result<(), ()>>: Send`
note: future is not `Send` as it awaits another future which is not `Send`
--> $DIR/basic.rs:13:5
|

View file

@ -39,7 +39,7 @@ error[E0277]: the trait bound `T: Clone` is not satisfied
--> $DIR/defaults-suitability.rs:28:23
|
LL | type Bar: Clone = Vec<T>;
| ^^^^^^ the trait `Clone` is not implemented for `T`
| ^^^^^^ the trait `Clone` is not implemented for `T`, which is required by `Vec<T>: Clone`
|
= note: required for `Vec<T>` to implement `Clone`
note: required by a bound in `Foo::Bar`
@ -88,7 +88,7 @@ error[E0277]: the trait bound `<Self as Foo2<T>>::Baz: Clone` is not satisfied
--> $DIR/defaults-suitability.rs:65:23
|
LL | type Bar: Clone = Vec<Self::Baz>;
| ^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `<Self as Foo2<T>>::Baz`
| ^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `<Self as Foo2<T>>::Baz`, which is required by `Vec<<Self as Foo2<T>>::Baz>: Clone`
|
= note: required for `Vec<<Self as Foo2<T>>::Baz>` to implement `Clone`
note: required by a bound in `Foo2::Bar`
@ -105,7 +105,7 @@ error[E0277]: the trait bound `<Self as Foo25<T>>::Baz: Clone` is not satisfied
--> $DIR/defaults-suitability.rs:74:23
|
LL | type Bar: Clone = Vec<Self::Baz>;
| ^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `<Self as Foo25<T>>::Baz`
| ^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `<Self as Foo25<T>>::Baz`, which is required by `Vec<<Self as Foo25<T>>::Baz>: Clone`
|
= note: required for `Vec<<Self as Foo25<T>>::Baz>` to implement `Clone`
note: required by a bound in `Foo25::Bar`

View file

@ -2,7 +2,7 @@ error[E0277]: the trait bound `str: Clone` is not satisfied
--> $DIR/hr-associated-type-bound-1.rs:12:14
|
LL | type U = str;
| ^^^ the trait `Clone` is not implemented for `str`
| ^^^ the trait `Clone` is not implemented for `str`, which is required by `for<'b> <i32 as X<'b>>::U: Clone`
|
= help: the trait `Clone` is implemented for `String`
note: required by a bound in `X`

View file

@ -2,7 +2,7 @@ error[E0277]: the trait bound `str: Clone` is not satisfied
--> $DIR/hr-associated-type-bound-param-1.rs:14:14
|
LL | type V = str;
| ^^^ the trait `Clone` is not implemented for `str`
| ^^^ the trait `Clone` is not implemented for `str`, which is required by `for<'b> <u8 as Y<'b, u8>>::V: Clone`
|
= help: the trait `Clone` is implemented for `String`
note: required by a bound in `Y`

View file

@ -18,7 +18,7 @@ error[E0277]: the trait bound `str: Clone` is not satisfied
--> $DIR/hr-associated-type-bound-param-2.rs:15:14
|
LL | type W = str;
| ^^^ the trait `Clone` is not implemented for `str`
| ^^^ the trait `Clone` is not implemented for `str`, which is required by `for<'b> <u16 as Z<'b, u16>>::W: Clone`
|
= help: the trait `Clone` is implemented for `String`
note: required by a bound in `Z`

View file

@ -2,7 +2,7 @@ error[E0277]: the trait bound `str: Clone` is not satisfied
--> $DIR/hr-associated-type-bound-param-3.rs:13:14
|
LL | type U = str;
| ^^^ the trait `Clone` is not implemented for `str`
| ^^^ the trait `Clone` is not implemented for `str`, which is required by `for<'b> <(T,) as X<'b, (T,)>>::U: Clone`
|
= help: the trait `Clone` is implemented for `String`
note: required by a bound in `X`

View file

@ -2,7 +2,7 @@ error[E0277]: the trait bound `str: Clone` is not satisfied
--> $DIR/hr-associated-type-bound-param-4.rs:13:14
|
LL | type U = str;
| ^^^ the trait `Clone` is not implemented for `str`
| ^^^ the trait `Clone` is not implemented for `str`, which is required by `for<'b> <(T,) as X<'b, T>>::U: Clone`
|
= help: the trait `Clone` is implemented for `String`
note: required by a bound in `X`

View file

@ -2,7 +2,7 @@ error[E0277]: the trait bound `str: Clone` is not satisfied
--> $DIR/hr-associated-type-bound-param-5.rs:26:14
|
LL | type U = str;
| ^^^ the trait `Clone` is not implemented for `str`
| ^^^ the trait `Clone` is not implemented for `str`, which is required by `for<'b> <<Vec<T> as Cycle>::Next as X<'b, <Vec<T> as Cycle>::Next>>::U: Clone`
|
= help: the trait `Clone` is implemented for `String`
note: required by a bound in `X`
@ -18,7 +18,7 @@ error[E0277]: the trait bound `str: Clone` is not satisfied
--> $DIR/hr-associated-type-bound-param-5.rs:31:14
|
LL | type U = str;
| ^^^ the trait `Clone` is not implemented for `str`
| ^^^ the trait `Clone` is not implemented for `str`, which is required by `for<'b> <<Box<T> as Cycle>::Next as X<'b, <Box<T> as Cycle>::Next>>::U: Clone`
|
= help: the trait `Clone` is implemented for `String`
note: required by a bound in `X`

View file

@ -2,7 +2,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
--> $DIR/issue-38821.rs:23:17
|
LL | #[derive(Debug, Copy, Clone)]
| ^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
| ^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
|
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
--> $DIR/issue-38821.rs:9:18
@ -21,7 +21,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
--> $DIR/issue-38821.rs:38:1
|
LL | pub enum ColumnInsertValue<Col, Expr> where
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
|
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
--> $DIR/issue-38821.rs:9:18
@ -45,7 +45,7 @@ LL | | Col: Column,
... |
LL | | Default(Col),
LL | | }
| |_^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
| |_^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
|
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
--> $DIR/issue-38821.rs:9:18
@ -63,7 +63,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
--> $DIR/issue-38821.rs:23:10
|
LL | #[derive(Debug, Copy, Clone)]
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
|
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
--> $DIR/issue-38821.rs:9:18
@ -82,7 +82,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
--> $DIR/issue-38821.rs:23:10
|
LL | #[derive(Debug, Copy, Clone)]
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
|
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
--> $DIR/issue-38821.rs:9:18
@ -102,7 +102,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
--> $DIR/issue-38821.rs:23:10
|
LL | #[derive(Debug, Copy, Clone)]
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
|
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
--> $DIR/issue-38821.rs:9:18
@ -117,7 +117,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
--> $DIR/issue-38821.rs:23:10
|
LL | #[derive(Debug, Copy, Clone)]
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
|
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
--> $DIR/issue-38821.rs:9:18
@ -133,7 +133,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
--> $DIR/issue-38821.rs:23:17
|
LL | #[derive(Debug, Copy, Clone)]
| ^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
| ^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
|
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
--> $DIR/issue-38821.rs:9:18
@ -153,7 +153,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
--> $DIR/issue-38821.rs:23:23
|
LL | #[derive(Debug, Copy, Clone)]
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
|
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
--> $DIR/issue-38821.rs:9:18
@ -172,7 +172,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
--> $DIR/issue-38821.rs:23:23
|
LL | #[derive(Debug, Copy, Clone)]
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
|
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
--> $DIR/issue-38821.rs:9:18
@ -192,7 +192,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
--> $DIR/issue-38821.rs:23:23
|
LL | #[derive(Debug, Copy, Clone)]
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
|
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
--> $DIR/issue-38821.rs:9:18
@ -207,7 +207,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
--> $DIR/issue-38821.rs:23:23
|
LL | #[derive(Debug, Copy, Clone)]
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
|
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
--> $DIR/issue-38821.rs:9:18
@ -223,7 +223,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
--> $DIR/issue-38821.rs:23:10
|
LL | #[derive(Debug, Copy, Clone)]
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
|
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
--> $DIR/issue-38821.rs:9:18
@ -239,7 +239,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
--> $DIR/issue-38821.rs:23:10
|
LL | #[derive(Debug, Copy, Clone)]
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
|
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
--> $DIR/issue-38821.rs:9:18
@ -255,7 +255,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
--> $DIR/issue-38821.rs:23:23
|
LL | #[derive(Debug, Copy, Clone)]
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
|
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
--> $DIR/issue-38821.rs:9:18
@ -271,7 +271,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
--> $DIR/issue-38821.rs:23:23
|
LL | #[derive(Debug, Copy, Clone)]
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
|
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
--> $DIR/issue-38821.rs:9:18

View file

@ -2,7 +2,7 @@ error[E0277]: the trait bound `T: Copy` is not satisfied
--> $DIR/issue-43784-associated-type.rs:14:18
|
LL | type Assoc = T;
| ^ the trait `Copy` is not implemented for `T`
| ^ the trait `Copy` is not implemented for `T`, which is required by `<T as Complete>::Assoc: Partial<T>`
|
note: required for `<T as Complete>::Assoc` to implement `Partial<T>`
--> $DIR/issue-43784-associated-type.rs:1:11

View file

@ -15,7 +15,7 @@ error[E0277]: the trait bound `T: MyDisplay` is not satisfied
--> $DIR/issue-65774-1.rs:44:76
|
LL | let closure = |config: &mut <S as MPU>::MpuConfig| writer.my_write(&config);
| ^^^^^^^ the trait `MyDisplay` is not implemented for `T`
| ^^^^^^^ the trait `MyDisplay` is not implemented for `T`, which is required by `&mut T: MyDisplay`
|
= help: the trait `MyDisplay` is implemented for `&'a mut T`
note: required for `&mut T` to implement `MyDisplay`

View file

@ -76,7 +76,7 @@ error[E0277]: the size for values of type `str` cannot be known at compilation t
LL | <str as Foo<u8>>::bar;
| ^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `str`
= help: the trait `Sized` is not implemented for `str`, which is required by `str: Foo<'_, '_, u8>`
note: required for `str` to implement `Foo<'_, '_, u8>`
--> $DIR/substs-ppaux.rs:11:17
|

View file

@ -76,7 +76,7 @@ error[E0277]: the size for values of type `str` cannot be known at compilation t
LL | <str as Foo<u8>>::bar;
| ^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `str`
= help: the trait `Sized` is not implemented for `str`, which is required by `str: Foo<'?0, '?1, u8>`
note: required for `str` to implement `Foo<'?0, '?1, u8>`
--> $DIR/substs-ppaux.rs:11:17
|

View file

@ -4,7 +4,7 @@ error: future cannot be sent between threads safely
LL | is_send(foo(Some(true)));
| ^^^^^^^^^^^^^^^ future returned by `foo` is not `Send`
|
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>`
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>`, which is required by `impl Future<Output = ()>: Send`
note: future is not `Send` as this value is used across an await
--> $DIR/async-await-let-else.rs:8:15
|
@ -29,7 +29,7 @@ LL | is_send(foo2(Some(true)));
| |
| required by a bound introduced by this call
|
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>`
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>`, which is required by `impl Future<Output = ()>: Send`
note: required because it's used within this `async` fn body
--> $DIR/async-await-let-else.rs:24:29
|
@ -61,7 +61,7 @@ error: future cannot be sent between threads safely
LL | is_send(foo3(Some(true)));
| ^^^^^^^^^^^^^^^^ future returned by `foo3` is not `Send`
|
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>`
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>`, which is required by `impl Future<Output = ()>: Send`
note: future is not `Send` as this value is used across an await
--> $DIR/async-await-let-else.rs:30:29
|
@ -81,7 +81,7 @@ error: future cannot be sent between threads safely
LL | is_send(foo4(Some(true)));
| ^^^^^^^^^^^^^^^^ future returned by `foo4` is not `Send`
|
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>`
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>`, which is required by `impl Future<Output = ()>: Send`
note: future is not `Send` as this value is used across an await
--> $DIR/async-await-let-else.rs:38:15
|

View file

@ -4,7 +4,7 @@ error: future cannot be sent between threads safely
LL | assert_send(non_send_temporary_in_match());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `non_send_temporary_in_match` is not `Send`
|
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>`
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>`, which is required by `impl Future<Output = ()>: Send`
note: future is not `Send` as this value is used across an await
--> $DIR/async-fn-nonsend.rs:33:26
|
@ -24,7 +24,7 @@ error: future cannot be sent between threads safely
LL | assert_send(non_sync_with_method_call());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `non_sync_with_method_call` is not `Send`
|
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `dyn std::fmt::Write`
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `dyn std::fmt::Write`, which is required by `impl Future<Output = ()>: Send`
note: future is not `Send` as this value is used across an await
--> $DIR/async-fn-nonsend.rs:46:15
|

View file

@ -15,7 +15,7 @@ LL | || });
| |_____|
| within this `{async block@$DIR/async-is-unwindsafe.rs:12:19: 29:6}`
|
= help: within `{async block@$DIR/async-is-unwindsafe.rs:12:19: 29:6}`, the trait `UnwindSafe` is not implemented for `&mut Context<'_>`
= help: within `{async block@$DIR/async-is-unwindsafe.rs:12:19: 29:6}`, the trait `UnwindSafe` is not implemented for `&mut Context<'_>`, which is required by `{async block@$DIR/async-is-unwindsafe.rs:12:19: 29:6}: UnwindSafe`
= note: `UnwindSafe` is implemented for `&Context<'_>`, but not for `&mut Context<'_>`
note: future does not implement `UnwindSafe` as this value is used across an await
--> $DIR/async-is-unwindsafe.rs:25:18

View file

@ -7,7 +7,7 @@ LL | [0usize; 0xffff_ffff_ffff_ffff].await;
| |`[usize; usize::MAX]` is not a future
| help: remove the `.await`
|
= help: the trait `Future` is not implemented for `[usize; usize::MAX]`
= help: the trait `Future` is not implemented for `[usize; usize::MAX]`, which is required by `[usize; usize::MAX]: IntoFuture`
= note: [usize; usize::MAX] must be a future or must implement `IntoFuture` to be awaited
= note: required for `[usize; usize::MAX]` to implement `IntoFuture`

View file

@ -15,7 +15,7 @@ LL | None { value: (), ..Default::default() }.await;
| |`Option<_>` is not a future
| help: remove the `.await`
|
= help: the trait `Future` is not implemented for `Option<_>`
= help: the trait `Future` is not implemented for `Option<_>`, which is required by `Option<_>: IntoFuture`
= note: Option<_> must be a future or must implement `IntoFuture` to be awaited
= note: required for `Option<_>` to implement `IntoFuture`

View file

@ -4,7 +4,7 @@ error: future cannot be sent between threads safely
LL | assert_send(agent.handle());
| ^^^^^^^^^^^^^^ future returned by `handle` is not `Send`
|
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<String>`
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<String>`, which is required by `impl Future<Output = ()>: Send`
note: future is not `Send` as this value is used across an await
--> $DIR/drop-track-field-assign-nonsend.rs:20:39
|

View file

@ -4,7 +4,7 @@ error: future cannot be sent between threads safely
LL | assert_send(agent.handle());
| ^^^^^^^^^^^^^^ future returned by `handle` is not `Send`
|
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<String>`
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<String>`, which is required by `impl Future<Output = ()>: Send`
note: future is not `Send` as this value is used across an await
--> $DIR/field-assign-nonsend.rs:20:39
|

View file

@ -4,7 +4,7 @@ error: future cannot be sent between threads safely
LL | assert_is_send(test::<T>());
| ^^^^^^^^^^^ future returned by `test` is not `Send`
|
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `impl Future<Output = ()>`
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `impl Future<Output = ()>`, which is required by `impl Future<Output = ()>: Send`
note: future is not `Send` as it awaits another future which is not `Send`
--> $DIR/missing-send-bound.rs:9:5
|

View file

@ -7,7 +7,7 @@ LL | .await
| |`()` is not a future
| help: remove the `.await`
|
= help: the trait `Future` is not implemented for `()`
= help: the trait `Future` is not implemented for `()`, which is required by `(): IntoFuture`
= note: () must be a future or must implement `IntoFuture` to be awaited
= note: required for `()` to implement `IntoFuture`

View file

@ -4,7 +4,7 @@ error: future cannot be shared between threads safely
LL | is_sync(bar());
| ^^^^^ future returned by `bar` is not `Sync`
|
= help: within `impl Future<Output = ()>`, the trait `Sync` is not implemented for `Foo`
= help: within `impl Future<Output = ()>`, the trait `Sync` is not implemented for `Foo`, which is required by `impl Future<Output = ()>: Sync`
note: future is not `Sync` as this value is used across an await
--> $DIR/issue-64130-1-sync.rs:15:11
|

View file

@ -4,7 +4,7 @@ error: future cannot be sent between threads safely
LL | is_send(bar());
| ^^^^^ future returned by `bar` is not `Send`
|
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Foo`
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Foo`, which is required by `impl Future<Output = ()>: Send`
note: future is not `Send` as this value is used across an await
--> $DIR/issue-64130-2-send.rs:15:11
|

View file

@ -5,7 +5,7 @@ LL | async fn bar() {
| -------------- within this `impl Future<Output = ()>`
...
LL | is_qux(bar());
| ^^^^^ within `impl Future<Output = ()>`, the trait `Qux` is not implemented for `Foo`
| ^^^^^ within `impl Future<Output = ()>`, the trait `Qux` is not implemented for `Foo`, which is required by `impl Future<Output = ()>: Qux`
|
note: future does not implement `Qux` as this value is used across an await
--> $DIR/issue-64130-3-other.rs:18:11

View file

@ -4,7 +4,7 @@ error: future cannot be sent between threads safely
LL | is_send(foo());
| ^^^^^ future returned by `foo` is not `Send`
|
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `MutexGuard<'_, u32>`
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `MutexGuard<'_, u32>`, which is required by `impl Future<Output = ()>: Send`
note: future is not `Send` as this value is used across an await
--> $DIR/issue-64130-non-send-future-diags.rs:17:11
|

View file

@ -8,7 +8,7 @@ LL | | let _a = a;
LL | | });
| |______^ future created by async block is not `Send`
|
= help: within `{async block@$DIR/issue-67252-unnamed-future.rs:18:11: 22:6}`, the trait `Send` is not implemented for `*mut ()`
= help: within `{async block@$DIR/issue-67252-unnamed-future.rs:18:11: 22:6}`, the trait `Send` is not implemented for `*mut ()`, which is required by `{async block@$DIR/issue-67252-unnamed-future.rs:18:11: 22:6}: Send`
note: future is not `Send` as this value is used across an await
--> $DIR/issue-67252-unnamed-future.rs:20:17
|

View file

@ -4,7 +4,7 @@ error: future cannot be sent between threads safely
LL | require_send(send_fut);
| ^^^^^^^^^^^^^^^^^^^^^^ future created by async block is not `Send`
|
= help: the trait `Sync` is not implemented for `RefCell<i32>`
= help: the trait `Sync` is not implemented for `RefCell<i32>`, which is required by `{async block@$DIR/issue-68112.rs:29:20: 33:6}: Send`
= note: if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock` instead
note: future is not `Send` as it awaits another future which is not `Send`
--> $DIR/issue-68112.rs:31:17
@ -23,7 +23,7 @@ error: future cannot be sent between threads safely
LL | require_send(send_fut);
| ^^^^^^^^^^^^^^^^^^^^^^ future created by async block is not `Send`
|
= help: the trait `Sync` is not implemented for `RefCell<i32>`
= help: the trait `Sync` is not implemented for `RefCell<i32>`, which is required by `{async block@$DIR/issue-68112.rs:39:20: 42:6}: Send`
= note: if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock` instead
note: future is not `Send` as it awaits another future which is not `Send`
--> $DIR/issue-68112.rs:40:17
@ -42,7 +42,7 @@ error[E0277]: `RefCell<i32>` cannot be shared between threads safely
LL | require_send(send_fut);
| ^^^^^^^^^^^^^^^^^^^^^^ `RefCell<i32>` cannot be shared between threads safely
|
= help: the trait `Sync` is not implemented for `RefCell<i32>`
= help: the trait `Sync` is not implemented for `RefCell<i32>`, which is required by `{async block@$DIR/issue-68112.rs:57:20: 61:6}: Send`
= note: if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock` instead
= note: required for `Arc<RefCell<i32>>` to implement `Send`
note: required because it's used within this `async` fn body

View file

@ -4,7 +4,7 @@ error[E0277]: `*mut ()` cannot be shared between threads safely
LL | fn foo(x: NotSync) -> impl Future + Send {
| ^^^^^^^^^^^^^^^^^^ `*mut ()` cannot be shared between threads safely
|
= help: within `NotSync`, the trait `Sync` is not implemented for `*mut ()`
= help: within `NotSync`, the trait `Sync` is not implemented for `*mut ()`, which is required by `{async block@$DIR/issue-70935-complex-spans.rs:17:5: 21:6}: Send`
note: required because it appears within the type `PhantomData<*mut ()>`
--> $SRC_DIR/core/src/marker.rs:LL:COL
note: required because it appears within the type `NotSync`

View file

@ -4,7 +4,7 @@ error: future cannot be sent between threads safely
LL | fake_spawn(wrong_mutex());
| ^^^^^^^^^^^^^ future returned by `wrong_mutex` is not `Send`
|
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `MutexGuard<'_, i32>`
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `MutexGuard<'_, i32>`, which is required by `impl Future<Output = ()>: Send`
note: future is not `Send` as this value is used across an await
--> $DIR/issue-71137.rs:14:26
|

View file

@ -16,7 +16,7 @@ error[E0277]: the size for values of type `str` cannot be known at compilation t
LL | async fn frob(self) {}
| ^^^^ doesn't have a size known at compile-time
|
= help: within `Foo`, the trait `Sized` is not implemented for `str`
= help: within `Foo`, the trait `Sized` is not implemented for `str`, which is required by `Foo: Sized`
note: required because it appears within the type `Foo`
--> $DIR/issue-72590-type-error-sized.rs:5:8
|

View file

@ -11,7 +11,7 @@ LL | g(issue_67893::run())
LL | pub async fn run() {
| ------------------ within this `impl Future<Output = ()>`
|
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `MutexGuard<'_, ()>`
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `MutexGuard<'_, ()>`, which is required by `impl Future<Output = ()>: Send`
= note: required because it captures the following types: `Arc<Mutex<()>>`, `MutexGuard<'_, ()>`, `impl Future<Output = ()>`
note: required because it's used within this `async` fn body
--> $DIR/auxiliary/issue_67893.rs:9:20

View file

@ -9,7 +9,7 @@ LL | gimme_send(foo());
LL | async fn foo() {
| -------------- within this `impl Future<Output = ()>`
|
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `NotSend`
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `NotSend`, which is required by `impl Future<Output = ()>: Send`
= note: required because it appears within the type `(NotSend,)`
= note: required because it captures the following types: `(NotSend,)`, `impl Future<Output = ()>`
note: required because it's used within this `async` fn body

View file

@ -2,7 +2,7 @@ error[E0277]: `PhantomPinned` cannot be unpinned
--> $DIR/pin-needed-to-poll-2.rs:43:18
|
LL | Pin::new(&mut self.sleep).poll(cx)
| -------- ^^^^^^^^^^^^^^^ within `Sleep`, the trait `Unpin` is not implemented for `PhantomPinned`
| -------- ^^^^^^^^^^^^^^^ within `Sleep`, the trait `Unpin` is not implemented for `PhantomPinned`, which is required by `Sleep: Unpin`
| |
| required by a bound introduced by this call
|

View file

@ -6,7 +6,7 @@ LL | boo().await;
| |
| this call returns `()`
|
= help: the trait `Future` is not implemented for `()`
= help: the trait `Future` is not implemented for `()`, which is required by `(): IntoFuture`
= note: () must be a future or must implement `IntoFuture` to be awaited
= note: required for `()` to implement `IntoFuture`
help: remove the `.await`
@ -28,7 +28,7 @@ LL | e!().await;
| |`()` is not a future
| help: remove the `.await`
|
= help: the trait `Future` is not implemented for `()`
= help: the trait `Future` is not implemented for `()`, which is required by `(): IntoFuture`
= note: () must be a future or must implement `IntoFuture` to be awaited
= note: required for `()` to implement `IntoFuture`
@ -44,7 +44,7 @@ LL | $expr.await
LL | f!(());
| ------ in this macro invocation
|
= help: the trait `Future` is not implemented for `()`
= help: the trait `Future` is not implemented for `()`, which is required by `(): IntoFuture`
= note: () must be a future or must implement `IntoFuture` to be awaited
= note: required for `()` to implement `IntoFuture`
= note: this error originates in the macro `f` (in Nightly builds, run with -Z macro-backtrace for more info)
@ -58,7 +58,7 @@ LL | for x in [] {}.await
| |`()` is not a future
| help: remove the `.await`
|
= help: the trait `Future` is not implemented for `()`
= help: the trait `Future` is not implemented for `()`, which is required by `(): IntoFuture`
= note: () must be a future or must implement `IntoFuture` to be awaited
= note: required for `()` to implement `IntoFuture`

View file

@ -4,7 +4,7 @@ error[E0277]: `Foo<T, U>` cannot be sent between threads safely
LL | fn generic<T, U>(v: Foo<T, U>, f: fn(<Foo<T, U> as WithAssoc>::Output) -> i32) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Foo<T, U>` cannot be sent between threads safely
|
= help: the trait `Send` is not implemented for `Foo<T, U>`
= help: the trait `Send` is not implemented for `Foo<T, U>`, which is required by `Foo<T, U>: WithAssoc`
note: required for `Foo<T, U>` to implement `WithAssoc`
--> $DIR/issue-83857-ub.rs:15:15
|

View file

@ -2,7 +2,7 @@ error[E0277]: the trait bound `[u8]: AutoTrait` is not satisfied in `str`
--> $DIR/str-contains-slice-conceptually.rs:11:22
|
LL | needs_auto_trait::<str>();
| ^^^ within `str`, the trait `AutoTrait` is not implemented for `[u8]`
| ^^^ within `str`, the trait `AutoTrait` is not implemented for `[u8]`, which is required by `str: AutoTrait`
|
= note: `str` is considered to contain a `[u8]` slice for auto trait purposes
note: required by a bound in `needs_auto_trait`

View file

@ -2,7 +2,7 @@ error[E0277]: the trait bound `MyS2: MyTrait` is not satisfied in `(MyS2, MyS)`
--> $DIR/typeck-default-trait-impl-constituent-types-2.rs:17:18
|
LL | is_mytrait::<(MyS2, MyS)>();
| ^^^^^^^^^^^ within `(MyS2, MyS)`, the trait `MyTrait` is not implemented for `MyS2`
| ^^^^^^^^^^^ within `(MyS2, MyS)`, the trait `MyTrait` is not implemented for `MyS2`, which is required by `(MyS2, MyS): MyTrait`
|
= note: required because it appears within the type `(MyS2, MyS)`
note: required by a bound in `is_mytrait`

View file

@ -2,7 +2,7 @@ error[E0277]: the trait bound `u32: Signed` is not satisfied
--> $DIR/typeck-default-trait-impl-precedence.rs:19:20
|
LL | is_defaulted::<&'static u32>();
| ^^^^^^^^^^^^ the trait `Signed` is not implemented for `u32`
| ^^^^^^^^^^^^ the trait `Signed` is not implemented for `u32`, which is required by `&'static u32: Defaulted`
|
note: required for `&'static u32` to implement `Defaulted`
--> $DIR/typeck-default-trait-impl-precedence.rs:10:19

View file

@ -27,7 +27,7 @@ error[E0277]: can't compare `&{integer}` with `{integer}`
LL | _ = foo == &0;
| ^^ no implementation for `&{integer} == {integer}`
|
= help: the trait `PartialEq<{integer}>` is not implemented for `&{integer}`
= help: the trait `PartialEq<{integer}>` is not implemented for `&{integer}`, which is required by `&&{integer}: PartialEq<&{integer}>`
= note: required for `&&{integer}` to implement `PartialEq<&{integer}>`
help: consider dereferencing here
|
@ -65,7 +65,7 @@ error[E0277]: can't compare `&&{integer}` with `{integer}`
LL | _ = &&foo == &&0;
| ^^ no implementation for `&&{integer} == {integer}`
|
= help: the trait `PartialEq<{integer}>` is not implemented for `&&{integer}`
= help: the trait `PartialEq<{integer}>` is not implemented for `&&{integer}`, which is required by `&&&&{integer}: PartialEq<&&{integer}>`
= note: required for `&&&{integer}` to implement `PartialEq<&{integer}>`
= note: 1 redundant requirement hidden
= note: required for `&&&&{integer}` to implement `PartialEq<&&{integer}>`
@ -119,7 +119,7 @@ error[E0277]: can't compare `{integer}` with `&{integer}`
LL | _ = &0 == foo;
| ^^ no implementation for `{integer} == &{integer}`
|
= help: the trait `PartialEq<&{integer}>` is not implemented for `{integer}`
= help: the trait `PartialEq<&{integer}>` is not implemented for `{integer}`, which is required by `&{integer}: PartialEq<&&{integer}>`
= note: required for `&{integer}` to implement `PartialEq<&&{integer}>`
help: consider dereferencing here
|
@ -157,7 +157,7 @@ error[E0277]: can't compare `{integer}` with `&&{integer}`
LL | _ = &&0 == &&foo;
| ^^ no implementation for `{integer} == &&{integer}`
|
= help: the trait `PartialEq<&&{integer}>` is not implemented for `{integer}`
= help: the trait `PartialEq<&&{integer}>` is not implemented for `{integer}`, which is required by `&&{integer}: PartialEq<&&&&{integer}>`
= note: required for `&{integer}` to implement `PartialEq<&&&{integer}>`
= note: 1 redundant requirement hidden
= note: required for `&&{integer}` to implement `PartialEq<&&&&{integer}>`
@ -173,7 +173,7 @@ error[E0277]: can't compare `Box<Box<{integer}>>` with `&&{integer}`
LL | _ = &Box::new(Box::new(42)) == &foo;
| ^^ no implementation for `Box<Box<{integer}>> == &&{integer}`
|
= help: the trait `PartialEq<&&{integer}>` is not implemented for `Box<Box<{integer}>>`
= help: the trait `PartialEq<&&{integer}>` is not implemented for `Box<Box<{integer}>>`, which is required by `&Box<Box<{integer}>>: PartialEq<&&&{integer}>`
= note: required for `&Box<Box<{integer}>>` to implement `PartialEq<&&&{integer}>`
help: consider dereferencing both sides of the expression
|
@ -187,7 +187,7 @@ error[E0277]: can't compare `Box<{integer}>` with `&&{integer}`
LL | _ = &Box::new(42) == &foo;
| ^^ no implementation for `Box<{integer}> == &&{integer}`
|
= help: the trait `PartialEq<&&{integer}>` is not implemented for `Box<{integer}>`
= help: the trait `PartialEq<&&{integer}>` is not implemented for `Box<{integer}>`, which is required by `&Box<{integer}>: PartialEq<&&&{integer}>`
= note: required for `&Box<{integer}>` to implement `PartialEq<&&&{integer}>`
help: consider dereferencing both sides of the expression
|
@ -201,7 +201,7 @@ error[E0277]: can't compare `Box<Box<Box<Box<{integer}>>>>` with `&&{integer}`
LL | _ = &Box::new(Box::new(Box::new(Box::new(42)))) == &foo;
| ^^ no implementation for `Box<Box<Box<Box<{integer}>>>> == &&{integer}`
|
= help: the trait `PartialEq<&&{integer}>` is not implemented for `Box<Box<Box<Box<{integer}>>>>`
= help: the trait `PartialEq<&&{integer}>` is not implemented for `Box<Box<Box<Box<{integer}>>>>`, which is required by `&Box<Box<Box<Box<{integer}>>>>: PartialEq<&&&{integer}>`
= note: required for `&Box<Box<Box<Box<{integer}>>>>` to implement `PartialEq<&&&{integer}>`
help: consider dereferencing both sides of the expression
|
@ -215,7 +215,7 @@ error[E0277]: can't compare `&&{integer}` with `Box<Box<Box<Box<{integer}>>>>`
LL | _ = &foo == &Box::new(Box::new(Box::new(Box::new(42))));
| ^^ no implementation for `&&{integer} == Box<Box<Box<Box<{integer}>>>>`
|
= help: the trait `PartialEq<Box<Box<Box<Box<{integer}>>>>>` is not implemented for `&&{integer}`
= help: the trait `PartialEq<Box<Box<Box<Box<{integer}>>>>>` is not implemented for `&&{integer}`, which is required by `&&&{integer}: PartialEq<&Box<Box<Box<Box<{integer}>>>>>`
= note: required for `&&&{integer}` to implement `PartialEq<&Box<Box<Box<Box<{integer}>>>>>`
help: consider dereferencing both sides of the expression
|

View file

@ -2,7 +2,7 @@ error[E0277]: the trait bound `{integer}: Scalar` is not satisfied
--> $DIR/issue-22645.rs:15:5
|
LL | b + 3
| ^ the trait `Scalar` is not implemented for `{integer}`
| ^ the trait `Scalar` is not implemented for `{integer}`, which is required by `Bob: Add<_>`
|
= help: the trait `Scalar` is implemented for `f64`
note: required for `Bob` to implement `Add<{integer}>`

View file

@ -10,7 +10,7 @@ LL | |
LL | | });
| |_____^ `std::sync::mpsc::Receiver<()>` cannot be shared between threads safely
|
= help: the trait `Sync` is not implemented for `std::sync::mpsc::Receiver<()>`
= help: the trait `Sync` is not implemented for `std::sync::mpsc::Receiver<()>`, which is required by `{closure@$DIR/closure-move-sync.rs:6:27: 6:29}: Send`
= note: required for `&std::sync::mpsc::Receiver<()>` to implement `Send`
note: required because it's used within this closure
--> $DIR/closure-move-sync.rs:6:27

View file

@ -4,7 +4,7 @@ error[E0277]: the size for values of type `dyn A` cannot be known at compilation
LL | a::foo::<fn() -> dyn A>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`
= help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`, which is required by `fn() -> dyn A: FnOnce()`
= note: required because it appears within the type `fn() -> dyn A`
error[E0277]: the size for values of type `dyn A` cannot be known at compilation time
@ -13,7 +13,7 @@ error[E0277]: the size for values of type `dyn A` cannot be known at compilation
LL | a::bar::<fn() -> dyn A, _>();
| ^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`
= help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`, which is required by `fn() -> dyn A: FnOnce()`
= note: required because it appears within the type `fn() -> dyn A`
note: required by a bound in `a::bar`
--> $DIR/closure-return-type-must-be-sized.rs:14:19
@ -27,7 +27,7 @@ error[E0277]: the size for values of type `dyn A` cannot be known at compilation
LL | a::baz::<fn() -> dyn A>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`
= help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`, which is required by `fn() -> dyn A: FnOnce()`
= note: required because it appears within the type `fn() -> dyn A`
error[E0277]: the size for values of type `dyn A` cannot be known at compilation time
@ -36,7 +36,7 @@ error[E0277]: the size for values of type `dyn A` cannot be known at compilation
LL | b::foo::<fn() -> dyn A>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`
= help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`, which is required by `fn() -> dyn A: FnOnce()`
= note: required because it appears within the type `fn() -> dyn A`
error[E0277]: the size for values of type `dyn A` cannot be known at compilation time
@ -45,7 +45,7 @@ error[E0277]: the size for values of type `dyn A` cannot be known at compilation
LL | b::bar::<fn() -> dyn A, _>();
| ^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`
= help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`, which is required by `fn() -> dyn A: Fn()`
= note: required because it appears within the type `fn() -> dyn A`
note: required by a bound in `b::bar`
--> $DIR/closure-return-type-must-be-sized.rs:28:19
@ -59,7 +59,7 @@ error[E0277]: the size for values of type `dyn A` cannot be known at compilation
LL | b::baz::<fn() -> dyn A>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`
= help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`, which is required by `fn() -> dyn A: FnOnce()`
= note: required because it appears within the type `fn() -> dyn A`
error[E0277]: the size for values of type `dyn A` cannot be known at compilation time
@ -68,7 +68,7 @@ error[E0277]: the size for values of type `dyn A` cannot be known at compilation
LL | c::foo::<fn() -> dyn A>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`
= help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`, which is required by `fn() -> dyn A: FnOnce()`
= note: required because it appears within the type `fn() -> dyn A`
error[E0277]: the size for values of type `dyn A` cannot be known at compilation time
@ -77,7 +77,7 @@ error[E0277]: the size for values of type `dyn A` cannot be known at compilation
LL | c::bar::<fn() -> dyn A, _>();
| ^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`
= help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`, which is required by `fn() -> dyn A: FnMut()`
= note: required because it appears within the type `fn() -> dyn A`
note: required by a bound in `c::bar`
--> $DIR/closure-return-type-must-be-sized.rs:42:19
@ -91,7 +91,7 @@ error[E0277]: the size for values of type `dyn A` cannot be known at compilation
LL | c::baz::<fn() -> dyn A>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`
= help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`, which is required by `fn() -> dyn A: FnOnce()`
= note: required because it appears within the type `fn() -> dyn A`
error: aborting due to 9 previous errors

View file

@ -2,7 +2,7 @@ error[E0277]: `NotParam` can't be used as a const parameter type
--> $DIR/const_param_ty_bad_empty_array.rs:10:13
|
LL | check::<[NotParam; 0]>();
| ^^^^^^^^^^^^^ the trait `ConstParamTy` is not implemented for `NotParam`
| ^^^^^^^^^^^^^ the trait `ConstParamTy` is not implemented for `NotParam`, which is required by `[NotParam; 0]: ConstParamTy`
|
= note: required for `[NotParam; 0]` to implement `ConstParamTy`
note: required by a bound in `check`

View file

@ -2,7 +2,7 @@ error[E0277]: `NotParam` can't be used as a const parameter type
--> $DIR/const_param_ty_generic_bounds_do_not_hold.rs:10:13
|
LL | check::<&NotParam>();
| ^^^^^^^^^ the trait `ConstParamTy` is not implemented for `NotParam`
| ^^^^^^^^^ the trait `ConstParamTy` is not implemented for `NotParam`, which is required by `&NotParam: ConstParamTy`
|
= note: required for `&NotParam` to implement `ConstParamTy`
note: required by a bound in `check`
@ -15,7 +15,7 @@ error[E0277]: `NotParam` can't be used as a const parameter type
--> $DIR/const_param_ty_generic_bounds_do_not_hold.rs:11:13
|
LL | check::<[NotParam]>();
| ^^^^^^^^^^ the trait `ConstParamTy` is not implemented for `NotParam`
| ^^^^^^^^^^ the trait `ConstParamTy` is not implemented for `NotParam`, which is required by `[NotParam]: ConstParamTy`
|
= note: required for `[NotParam]` to implement `ConstParamTy`
note: required by a bound in `check`
@ -28,7 +28,7 @@ error[E0277]: `NotParam` can't be used as a const parameter type
--> $DIR/const_param_ty_generic_bounds_do_not_hold.rs:12:13
|
LL | check::<[NotParam; 17]>();
| ^^^^^^^^^^^^^^ the trait `ConstParamTy` is not implemented for `NotParam`
| ^^^^^^^^^^^^^^ the trait `ConstParamTy` is not implemented for `NotParam`, which is required by `[NotParam; 17]: ConstParamTy`
|
= note: required for `[NotParam; 17]` to implement `ConstParamTy`
note: required by a bound in `check`

View file

@ -2,7 +2,7 @@ error[E0277]: the trait bound `(): _Contains<&C>` is not satisfied
--> $DIR/issue-85848.rs:24:29
|
LL | writes_to_specific_path(&cap);
| ----------------------- ^^^^ the trait `_Contains<&C>` is not implemented for `()`
| ----------------------- ^^^^ the trait `_Contains<&C>` is not implemented for `()`, which is required by `&C: Delegates<()>`
| |
| required by a bound introduced by this call
|

View file

@ -26,7 +26,7 @@ error[E0277]: the trait bound `[u16; 3]: Bar` is not satisfied
--> $DIR/issue-67185-2.rs:21:6
|
LL | impl Foo for FooImpl {}
| ^^^ the trait `Bar` is not implemented for `[u16; 3]`
| ^^^ the trait `Bar` is not implemented for `[u16; 3]`, which is required by `<u8 as Baz>::Quaks: Bar`
|
= help: the following other types implement trait `Bar`:
[u16; 4]
@ -44,7 +44,7 @@ error[E0277]: the trait bound `[[u16; 3]; 2]: Bar` is not satisfied
--> $DIR/issue-67185-2.rs:21:6
|
LL | impl Foo for FooImpl {}
| ^^^ the trait `Bar` is not implemented for `[[u16; 3]; 2]`
| ^^^ the trait `Bar` is not implemented for `[[u16; 3]; 2]`, which is required by `[<u8 as Baz>::Quaks; 2]: Bar`
|
= help: the following other types implement trait `Bar`:
[u16; 4]

View file

@ -2,7 +2,7 @@ error[E0277]: the trait bound `Bar: Copy` is not satisfied
--> $DIR/fn-call-in-non-const.rs:14:32
|
LL | let _: [Option<Bar>; 2] = [no_copy(); 2];
| ^^^^^^^^^ the trait `Copy` is not implemented for `Bar`
| ^^^^^^^^^ the trait `Copy` is not implemented for `Bar`, which is required by `Option<Bar>: Copy`
|
= note: required for `Option<Bar>` to implement `Copy`
= note: the `Copy` trait is required because this value will be copied for each element of the array

View file

@ -2,7 +2,7 @@ error[E0277]: the trait bound `Bar: Copy` is not satisfied
--> $DIR/migrate-fail.rs:11:38
|
LL | let arr: [Option<Bar>; 2] = [x; 2];
| ^ the trait `Copy` is not implemented for `Bar`
| ^ the trait `Copy` is not implemented for `Bar`, which is required by `Option<Bar>: Copy`
|
= note: required for `Option<Bar>` to implement `Copy`
= note: the `Copy` trait is required because this value will be copied for each element of the array
@ -18,7 +18,7 @@ error[E0277]: the trait bound `Bar: Copy` is not satisfied
--> $DIR/migrate-fail.rs:17:38
|
LL | let arr: [Option<Bar>; 2] = [x; 2];
| ^ the trait `Copy` is not implemented for `Bar`
| ^ the trait `Copy` is not implemented for `Bar`, which is required by `Option<Bar>: Copy`
|
= note: required for `Option<Bar>` to implement `Copy`
= note: the `Copy` trait is required because this value will be copied for each element of the array

View file

@ -2,7 +2,7 @@ error[E0277]: the trait bound `Bar: Copy` is not satisfied
--> $DIR/nll-fail.rs:11:38
|
LL | let arr: [Option<Bar>; 2] = [x; 2];
| ^ the trait `Copy` is not implemented for `Bar`
| ^ the trait `Copy` is not implemented for `Bar`, which is required by `Option<Bar>: Copy`
|
= note: required for `Option<Bar>` to implement `Copy`
= note: the `Copy` trait is required because this value will be copied for each element of the array
@ -18,7 +18,7 @@ error[E0277]: the trait bound `Bar: Copy` is not satisfied
--> $DIR/nll-fail.rs:17:38
|
LL | let arr: [Option<Bar>; 2] = [x; 2];
| ^ the trait `Copy` is not implemented for `Bar`
| ^ the trait `Copy` is not implemented for `Bar`, which is required by `Option<Bar>: Copy`
|
= note: required for `Option<Bar>` to implement `Copy`
= note: the `Copy` trait is required because this value will be copied for each element of the array

View file

@ -2,7 +2,7 @@ error[E0277]: the trait bound `String: Copy` is not satisfied
--> $DIR/trait-error.rs:5:6
|
LL | [Foo(String::new()); 4];
| ^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `String`
| ^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `String`, which is required by `Foo<String>: Copy`
|
note: required for `Foo<String>` to implement `Copy`
--> $DIR/trait-error.rs:1:10

View file

@ -40,7 +40,6 @@ help: the constant being evaluated
|
LL | const Y: u32 = simple_loop(35);
| ^^^^^^^^^^^^
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
warning: constant evaluation is taking a long time
--> $DIR/ctfe-simple-loop.rs:9:5

View file

@ -2,7 +2,7 @@ error[E0277]: the trait bound `String: Copy` is not satisfied
--> $DIR/const-fn-in-vec.rs:1:47
|
LL | static _MAYBE_STRINGS: [Option<String>; 5] = [None; 5];
| ^^^^ the trait `Copy` is not implemented for `String`
| ^^^^ the trait `Copy` is not implemented for `String`, which is required by `Option<String>: Copy`
|
= note: required for `Option<String>` to implement `Copy`
= note: the `Copy` trait is required because this value will be copied for each element of the array
@ -31,7 +31,7 @@ error[E0277]: the trait bound `String: Copy` is not satisfied
--> $DIR/const-fn-in-vec.rs:9:48
|
LL | let _maybe_strings: [Option<String>; 5] = [None; 5];
| ^^^^ the trait `Copy` is not implemented for `String`
| ^^^^ the trait `Copy` is not implemented for `String`, which is required by `Option<String>: Copy`
|
= note: required for `Option<String>` to implement `Copy`
= note: the `Copy` trait is required because this value will be copied for each element of the array

View file

@ -5,7 +5,7 @@ LL | let gen_clone_0 = move || {
| ------- within this `{coroutine@$DIR/clone-impl.rs:36:23: 36:30}`
...
LL | check_copy(&gen_clone_0);
| ^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:36:23: 36:30}`, the trait `Copy` is not implemented for `Vec<u32>`
| ^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:36:23: 36:30}`, the trait `Copy` is not implemented for `Vec<u32>`, which is required by `{coroutine@$DIR/clone-impl.rs:36:23: 36:30}: Copy`
|
note: captured value does not implement `Copy`
--> $DIR/clone-impl.rs:40:14
@ -25,7 +25,7 @@ LL | let gen_clone_0 = move || {
| ------- within this `{coroutine@$DIR/clone-impl.rs:36:23: 36:30}`
...
LL | check_copy(&gen_clone_0);
| ^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:36:23: 36:30}`, the trait `Copy` is not implemented for `Vec<char>`
| ^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:36:23: 36:30}`, the trait `Copy` is not implemented for `Vec<char>`, which is required by `{coroutine@$DIR/clone-impl.rs:36:23: 36:30}: Copy`
|
note: coroutine does not implement `Copy` as this value is used across a yield
--> $DIR/clone-impl.rs:38:9
@ -47,7 +47,7 @@ LL | let gen_clone_1 = move || {
| ------- within this `{coroutine@$DIR/clone-impl.rs:46:23: 46:30}`
...
LL | check_copy(&gen_clone_1);
| ^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:46:23: 46:30}`, the trait `Copy` is not implemented for `Vec<u32>`
| ^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:46:23: 46:30}`, the trait `Copy` is not implemented for `Vec<u32>`, which is required by `{coroutine@$DIR/clone-impl.rs:46:23: 46:30}: Copy`
|
note: captured value does not implement `Copy`
--> $DIR/clone-impl.rs:56:14
@ -67,7 +67,7 @@ LL | let gen_clone_1 = move || {
| ------- within this `{coroutine@$DIR/clone-impl.rs:46:23: 46:30}`
...
LL | check_copy(&gen_clone_1);
| ^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:46:23: 46:30}`, the trait `Copy` is not implemented for `Vec<char>`
| ^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:46:23: 46:30}`, the trait `Copy` is not implemented for `Vec<char>`, which is required by `{coroutine@$DIR/clone-impl.rs:46:23: 46:30}: Copy`
|
note: coroutine does not implement `Copy` as this value is used across a yield
--> $DIR/clone-impl.rs:52:9
@ -90,7 +90,7 @@ LL | let gen_non_clone = move || {
| ------- within this `{coroutine@$DIR/clone-impl.rs:62:25: 62:32}`
...
LL | check_copy(&gen_non_clone);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:62:25: 62:32}`, the trait `Copy` is not implemented for `NonClone`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:62:25: 62:32}`, the trait `Copy` is not implemented for `NonClone`, which is required by `{coroutine@$DIR/clone-impl.rs:62:25: 62:32}: Copy`
|
note: captured value does not implement `Copy`
--> $DIR/clone-impl.rs:64:14
@ -115,7 +115,7 @@ LL | let gen_non_clone = move || {
| ------- within this `{coroutine@$DIR/clone-impl.rs:62:25: 62:32}`
...
LL | check_clone(&gen_non_clone);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:62:25: 62:32}`, the trait `Clone` is not implemented for `NonClone`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:62:25: 62:32}`, the trait `Clone` is not implemented for `NonClone`, which is required by `{coroutine@$DIR/clone-impl.rs:62:25: 62:32}: Clone`
|
note: captured value does not implement `Clone`
--> $DIR/clone-impl.rs:64:14

View file

@ -13,7 +13,7 @@ LL | | };
LL | | );
| |_____- in this macro invocation
|
= help: within `{coroutine@$DIR/drop-tracking-parent-expression.rs:17:21: 17:28}`, the trait `Send` is not implemented for `derived_drop::Client`
= help: within `{coroutine@$DIR/drop-tracking-parent-expression.rs:17:21: 17:28}`, the trait `Send` is not implemented for `derived_drop::Client`, which is required by `{coroutine@$DIR/drop-tracking-parent-expression.rs:17:21: 17:28}: Send`
note: coroutine is not `Send` as this value is used across a yield
--> $DIR/drop-tracking-parent-expression.rs:21:22
|
@ -53,7 +53,7 @@ LL | | };
LL | | );
| |_____- in this macro invocation
|
= help: within `{coroutine@$DIR/drop-tracking-parent-expression.rs:17:21: 17:28}`, the trait `Send` is not implemented for `significant_drop::Client`
= help: within `{coroutine@$DIR/drop-tracking-parent-expression.rs:17:21: 17:28}`, the trait `Send` is not implemented for `significant_drop::Client`, which is required by `{coroutine@$DIR/drop-tracking-parent-expression.rs:17:21: 17:28}: Send`
note: coroutine is not `Send` as this value is used across a yield
--> $DIR/drop-tracking-parent-expression.rs:21:22
|
@ -93,7 +93,7 @@ LL | | };
LL | | );
| |_____- in this macro invocation
|
= help: within `{coroutine@$DIR/drop-tracking-parent-expression.rs:17:21: 17:28}`, the trait `Send` is not implemented for `insignificant_dtor::Client`
= help: within `{coroutine@$DIR/drop-tracking-parent-expression.rs:17:21: 17:28}`, the trait `Send` is not implemented for `insignificant_dtor::Client`, which is required by `{coroutine@$DIR/drop-tracking-parent-expression.rs:17:21: 17:28}: Send`
note: coroutine is not `Send` as this value is used across a yield
--> $DIR/drop-tracking-parent-expression.rs:21:22
|

View file

@ -9,7 +9,7 @@ LL | | yield;
LL | | })
| |______^ coroutine is not `Send`
|
= help: within `{coroutine@$DIR/drop-yield-twice.rs:7:17: 7:19}`, the trait `Send` is not implemented for `Foo`
= help: within `{coroutine@$DIR/drop-yield-twice.rs:7:17: 7:19}`, the trait `Send` is not implemented for `Foo`, which is required by `{coroutine@$DIR/drop-yield-twice.rs:7:17: 7:19}: Send`
note: coroutine is not `Send` as this value is used across a yield
--> $DIR/drop-yield-twice.rs:9:9
|

View file

@ -29,7 +29,7 @@ LL | let mut g = || {
| -- within this `{coroutine@$DIR/issue-105084.rs:14:17: 14:19}`
...
LL | let mut h = copy(g);
| ^^^^^^^ within `{coroutine@$DIR/issue-105084.rs:14:17: 14:19}`, the trait `Copy` is not implemented for `Box<(i32, ())>`
| ^^^^^^^ within `{coroutine@$DIR/issue-105084.rs:14:17: 14:19}`, the trait `Copy` is not implemented for `Box<(i32, ())>`, which is required by `{coroutine@$DIR/issue-105084.rs:14:17: 14:19}: Copy`
|
note: coroutine does not implement `Copy` as this value is used across a yield
--> $DIR/issue-105084.rs:21:22

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