mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
Rollup merge of #124948 - blyxyas:remove-repeated-words, r=compiler-errors
chore: Remove repeated words (extension of #124924) When I saw #124924 I thought "Hey, I'm sure that there are far more than just two typos of this nature in the codebase". So here's some more typo-fixing. Some found with regex, some found with a spellchecker. Every single one manually reviewed by me (along with hundreds of false negatives by the tools)
This commit is contained in:
commit
d5bef41ee5
@ -652,7 +652,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: We make sure that this is a normal top-level binding,
|
// FIXME: We make sure that this is a normal top-level binding,
|
||||||
// but we could suggest `todo!()` for all uninitialized bindings in the pattern pattern
|
// but we could suggest `todo!()` for all uninitialized bindings in the pattern
|
||||||
if let hir::StmtKind::Let(hir::LetStmt { span, ty, init: None, pat, .. }) =
|
if let hir::StmtKind::Let(hir::LetStmt { span, ty, init: None, pat, .. }) =
|
||||||
&ex.kind
|
&ex.kind
|
||||||
&& let hir::PatKind::Binding(..) = pat.kind
|
&& let hir::PatKind::Binding(..) = pat.kind
|
||||||
|
@ -3112,7 +3112,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
|||||||
|
|
||||||
let true_errors = ocx.select_where_possible();
|
let true_errors = ocx.select_where_possible();
|
||||||
|
|
||||||
// Do a leak check -- we can't really report report a useful error here,
|
// Do a leak check -- we can't really report a useful error here,
|
||||||
// but it at least avoids an ICE when the error has to do with higher-ranked
|
// but it at least avoids an ICE when the error has to do with higher-ranked
|
||||||
// lifetimes.
|
// lifetimes.
|
||||||
self.leak_check(outer_universe, Some(snapshot))?;
|
self.leak_check(outer_universe, Some(snapshot))?;
|
||||||
|
@ -38,7 +38,7 @@ declare_lint! {
|
|||||||
///
|
///
|
||||||
/// Creating non-local definitions go against expectation and can create discrepancies
|
/// Creating non-local definitions go against expectation and can create discrepancies
|
||||||
/// in tooling. It should be avoided. It may become deny-by-default in edition 2024
|
/// in tooling. It should be avoided. It may become deny-by-default in edition 2024
|
||||||
/// and higher, see see the tracking issue <https://github.com/rust-lang/rust/issues/120363>.
|
/// and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>.
|
||||||
///
|
///
|
||||||
/// An `impl` definition is non-local if it is nested inside an item and neither
|
/// An `impl` definition is non-local if it is nested inside an item and neither
|
||||||
/// the type nor the trait are at the same nesting level as the `impl` block.
|
/// the type nor the trait are at the same nesting level as the `impl` block.
|
||||||
|
@ -269,7 +269,7 @@ fn trait_object_ty<'tcx>(tcx: TyCtxt<'tcx>, poly_trait_ref: ty::PolyTraitRef<'tc
|
|||||||
/// if a function is member of the group derived from this type id. Therefore, in the first call to
|
/// if a function is member of the group derived from this type id. Therefore, in the first call to
|
||||||
/// typeid_for_fnabi (when type ids are attached to functions and methods), it can only include at
|
/// typeid_for_fnabi (when type ids are attached to functions and methods), it can only include at
|
||||||
/// most as much information that would be available in the second call (i.e., during code
|
/// most as much information that would be available in the second call (i.e., during code
|
||||||
/// generation at call sites); otherwise, the type ids would not not match.
|
/// generation at call sites); otherwise, the type ids would not match.
|
||||||
///
|
///
|
||||||
/// For this, it:
|
/// For this, it:
|
||||||
///
|
///
|
||||||
|
@ -122,7 +122,7 @@ macro_rules! for_base_types {
|
|||||||
#[inline]
|
#[inline]
|
||||||
#[must_use = "operator returns a new vector without mutating the inputs"]
|
#[must_use = "operator returns a new vector without mutating the inputs"]
|
||||||
// TODO: only useful for int Div::div, but we hope that this
|
// TODO: only useful for int Div::div, but we hope that this
|
||||||
// will essentially always always get inlined anyway.
|
// will essentially always get inlined anyway.
|
||||||
#[track_caller]
|
#[track_caller]
|
||||||
fn $call(self, rhs: Self) -> Self::Output {
|
fn $call(self, rhs: Self) -> Self::Output {
|
||||||
$macro_impl!(self, rhs, $inner, $scalar)
|
$macro_impl!(self, rhs, $inner, $scalar)
|
||||||
|
@ -127,7 +127,7 @@ pub(super) fn check<'tcx>(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// checks for for collecting into a (generic) method or function argument
|
/// checks for collecting into a (generic) method or function argument
|
||||||
/// taking an `IntoIterator`
|
/// taking an `IntoIterator`
|
||||||
fn check_collect_into_intoiterator<'tcx>(
|
fn check_collect_into_intoiterator<'tcx>(
|
||||||
cx: &LateContext<'tcx>,
|
cx: &LateContext<'tcx>,
|
||||||
|
@ -282,7 +282,7 @@ mod issue_9218 {
|
|||||||
todo!()
|
todo!()
|
||||||
}
|
}
|
||||||
|
|
||||||
// These two's return types don't use use 'a so it's not okay
|
// These two's return types don't use 'a so it's not okay
|
||||||
fn cow_bad_ret_ty_1<'a>(input: &'a Cow<'a, str>) -> &'static str {
|
fn cow_bad_ret_ty_1<'a>(input: &'a Cow<'a, str>) -> &'static str {
|
||||||
//~^ ERROR: using a reference to `Cow` is not recommended
|
//~^ ERROR: using a reference to `Cow` is not recommended
|
||||||
todo!()
|
todo!()
|
||||||
|
@ -250,7 +250,7 @@ pub struct Config {
|
|||||||
/// Only run tests that match these filters
|
/// Only run tests that match these filters
|
||||||
pub filters: Vec<String>,
|
pub filters: Vec<String>,
|
||||||
|
|
||||||
/// Skip tests tests matching these substrings. Corresponds to
|
/// Skip tests matching these substrings. Corresponds to
|
||||||
/// `test::TestOpts::skip`. `filter_exact` does not apply to these flags.
|
/// `test::TestOpts::skip`. `filter_exact` does not apply to these flags.
|
||||||
pub skip: Vec<String>,
|
pub skip: Vec<String>,
|
||||||
|
|
||||||
@ -381,7 +381,7 @@ pub struct Config {
|
|||||||
/// Whether to rerun tests even if the inputs are unchanged.
|
/// Whether to rerun tests even if the inputs are unchanged.
|
||||||
pub force_rerun: bool,
|
pub force_rerun: bool,
|
||||||
|
|
||||||
/// Only rerun the tests that result has been modified accoring to Git status
|
/// Only rerun the tests that result has been modified according to Git status
|
||||||
pub only_modified: bool,
|
pub only_modified: bool,
|
||||||
|
|
||||||
pub target_cfgs: OnceLock<TargetCfgs>,
|
pub target_cfgs: OnceLock<TargetCfgs>,
|
||||||
|
@ -950,7 +950,7 @@ fn is_android_gdb_target(target: &str) -> bool {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns `true` if the given target is a MSVC target for the purpouses of CDB testing.
|
/// Returns `true` if the given target is a MSVC target for the purposes of CDB testing.
|
||||||
fn is_pc_windows_msvc_target(target: &str) -> bool {
|
fn is_pc_windows_msvc_target(target: &str) -> bool {
|
||||||
target.ends_with("-pc-windows-msvc")
|
target.ends_with("-pc-windows-msvc")
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ const LOCAL_CRATE_ID: u32 = 0;
|
|||||||
/// it is well formed. This involves calling `check_*` functions on
|
/// it is well formed. This involves calling `check_*` functions on
|
||||||
/// fields of that item, and `add_*` functions on [`Id`]s.
|
/// fields of that item, and `add_*` functions on [`Id`]s.
|
||||||
/// - `add_*`: These add an [`Id`] to the worklist, after validating it to check if
|
/// - `add_*`: These add an [`Id`] to the worklist, after validating it to check if
|
||||||
/// the `Id` is a kind expected in this suituation.
|
/// the `Id` is a kind expected in this situation.
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct Validator<'a> {
|
pub struct Validator<'a> {
|
||||||
pub(crate) errs: Vec<Error>,
|
pub(crate) errs: Vec<Error>,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
//! Script to invoke the bundled rust-lld with the correct flavor.
|
//! Script to invoke the bundled rust-lld with the correct flavor.
|
||||||
//!
|
//!
|
||||||
//! lld supports multiple command line interfaces. If `-flavor <flavor>` are passed as the first
|
//! `lld` supports multiple command line interfaces. If `-flavor <flavor>` are passed as the first
|
||||||
//! two arguments the `<flavor>` command line interface is used to process the remaining arguments.
|
//! two arguments the `<flavor>` command line interface is used to process the remaining arguments.
|
||||||
//! If no `-flavor` argument is present the flavor is determined by the executable name.
|
//! If no `-flavor` argument is present the flavor is determined by the executable name.
|
||||||
//!
|
//!
|
||||||
|
@ -269,7 +269,7 @@ pub fn get_target_dir(meta: &Metadata) -> PathBuf {
|
|||||||
output
|
output
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Determines where the sysroot of this exeuction is
|
/// Determines where the sysroot of this execution is
|
||||||
///
|
///
|
||||||
/// Either in a user-specified spot by an envar, or in a default cache location.
|
/// Either in a user-specified spot by an envar, or in a default cache location.
|
||||||
pub fn get_sysroot_dir() -> PathBuf {
|
pub fn get_sysroot_dir() -> PathBuf {
|
||||||
|
@ -255,7 +255,7 @@ impl Command {
|
|||||||
cmd!(sh, "git fetch http://localhost:{JOSH_PORT}/rust-lang/rust.git@{commit}{JOSH_FILTER}.git")
|
cmd!(sh, "git fetch http://localhost:{JOSH_PORT}/rust-lang/rust.git@{commit}{JOSH_FILTER}.git")
|
||||||
.run()
|
.run()
|
||||||
.map_err(|e| {
|
.map_err(|e| {
|
||||||
// Try to un-do the previous `git commit`, to leave the repo in the state we found it it.
|
// Try to un-do the previous `git commit`, to leave the repo in the state we found it.
|
||||||
cmd!(sh, "git reset --hard HEAD^")
|
cmd!(sh, "git reset --hard HEAD^")
|
||||||
.run()
|
.run()
|
||||||
.expect("FAILED to clean up again after failed `git fetch`, sorry for that");
|
.expect("FAILED to clean up again after failed `git fetch`, sorry for that");
|
||||||
|
@ -9,7 +9,7 @@ use crate::borrow_tracker::{
|
|||||||
};
|
};
|
||||||
use crate::ProvenanceExtra;
|
use crate::ProvenanceExtra;
|
||||||
|
|
||||||
/// Exactly what cache size we should use is a difficult tradeoff. There will always be some
|
/// Exactly what cache size we should use is a difficult trade-off. There will always be some
|
||||||
/// workload which has a `BorTag` working set which exceeds the size of the cache, and ends up
|
/// workload which has a `BorTag` working set which exceeds the size of the cache, and ends up
|
||||||
/// falling back to linear searches of the borrow stack very often.
|
/// falling back to linear searches of the borrow stack very often.
|
||||||
/// The cost of making this value too large is that the loop in `Stack::insert` which ensures the
|
/// The cost of making this value too large is that the loop in `Stack::insert` which ensures the
|
||||||
|
@ -390,7 +390,7 @@ struct DisplayFmtWrapper {
|
|||||||
warning_text: S,
|
warning_text: S,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Formating of the permissions on each range.
|
/// Formatting of the permissions on each range.
|
||||||
///
|
///
|
||||||
/// Example:
|
/// Example:
|
||||||
/// ```rust,ignore (private type)
|
/// ```rust,ignore (private type)
|
||||||
@ -422,7 +422,7 @@ struct DisplayFmtPermission {
|
|||||||
range_sep: S,
|
range_sep: S,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Formating of the tree structure.
|
/// Formatting of the tree structure.
|
||||||
///
|
///
|
||||||
/// Example:
|
/// Example:
|
||||||
/// ```rust,ignore (private type)
|
/// ```rust,ignore (private type)
|
||||||
@ -487,7 +487,7 @@ struct DisplayFmtAccess {
|
|||||||
meh: S,
|
meh: S,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// All parameters to determine how the tree is formated.
|
/// All parameters to determine how the tree is formatted.
|
||||||
struct DisplayFmt {
|
struct DisplayFmt {
|
||||||
wrapper: DisplayFmtWrapper,
|
wrapper: DisplayFmtWrapper,
|
||||||
perm: DisplayFmtPermission,
|
perm: DisplayFmtPermission,
|
||||||
|
@ -202,7 +202,7 @@ impl Permission {
|
|||||||
Self { inner: Frozen }
|
Self { inner: Frozen }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Default initial permission of the root of a new tre at out-of-bounds positions.
|
/// Default initial permission of the root of a new tree at out-of-bounds positions.
|
||||||
/// Must *only* be used for the root, this is not in general an "initial" permission!
|
/// Must *only* be used for the root, this is not in general an "initial" permission!
|
||||||
pub fn new_disabled() -> Self {
|
pub fn new_disabled() -> Self {
|
||||||
Self { inner: Disabled }
|
Self { inner: Disabled }
|
||||||
|
@ -483,7 +483,7 @@ mod spurious_read {
|
|||||||
/// that causes UB in the target but not in the source.
|
/// that causes UB in the target but not in the source.
|
||||||
/// This implementation simply explores the reachable space
|
/// This implementation simply explores the reachable space
|
||||||
/// by all sequences of `TestEvent`.
|
/// by all sequences of `TestEvent`.
|
||||||
/// This function can be instanciated with `RetX` and `RetY`
|
/// This function can be instantiated with `RetX` and `RetY`
|
||||||
/// among `NoRet` or `AllowRet` to resp. forbid/allow `x`/`y` to lose their
|
/// among `NoRet` or `AllowRet` to resp. forbid/allow `x`/`y` to lose their
|
||||||
/// protector.
|
/// protector.
|
||||||
fn distinguishable<RetX, RetY>(&self, other: &Self) -> bool
|
fn distinguishable<RetX, RetY>(&self, other: &Self) -> bool
|
||||||
|
@ -111,7 +111,7 @@ pub enum BlockReason {
|
|||||||
Condvar(CondvarId),
|
Condvar(CondvarId),
|
||||||
/// Blocked on a reader-writer lock.
|
/// Blocked on a reader-writer lock.
|
||||||
RwLock(RwLockId),
|
RwLock(RwLockId),
|
||||||
/// Blocled on a Futex variable.
|
/// Blocked on a Futex variable.
|
||||||
Futex { addr: u64 },
|
Futex { addr: u64 },
|
||||||
/// Blocked on an InitOnce.
|
/// Blocked on an InitOnce.
|
||||||
InitOnce(InitOnceId),
|
InitOnce(InitOnceId),
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
//! One consequence of this difference is that safe/sound Rust allows for more operations on atomic locations
|
//! One consequence of this difference is that safe/sound Rust allows for more operations on atomic locations
|
||||||
//! than the C++20 atomic API was intended to allow, such as non-atomically accessing
|
//! than the C++20 atomic API was intended to allow, such as non-atomically accessing
|
||||||
//! a previously atomically accessed location, or accessing previously atomically accessed locations with a differently sized operation
|
//! a previously atomically accessed location, or accessing previously atomically accessed locations with a differently sized operation
|
||||||
//! (such as accessing the top 16 bits of an AtomicU32). These scenarios are generally undiscussed in formalisations of C++ memory model.
|
//! (such as accessing the top 16 bits of an AtomicU32). These scenarios are generally undiscussed in formalizations of C++ memory model.
|
||||||
//! In Rust, these operations can only be done through a `&mut AtomicFoo` reference or one derived from it, therefore these operations
|
//! In Rust, these operations can only be done through a `&mut AtomicFoo` reference or one derived from it, therefore these operations
|
||||||
//! can only happen after all previous accesses on the same locations. This implementation is adapted to allow these operations.
|
//! can only happen after all previous accesses on the same locations. This implementation is adapted to allow these operations.
|
||||||
//! A mixed atomicity read that races with writes, or a write that races with reads or writes will still cause UBs to be thrown.
|
//! A mixed atomicity read that races with writes, or a write that races with reads or writes will still cause UBs to be thrown.
|
||||||
|
@ -206,11 +206,11 @@ pub enum Provenance {
|
|||||||
/// whether *some* exposed pointer could have done what we want to do, and if the answer is yes
|
/// whether *some* exposed pointer could have done what we want to do, and if the answer is yes
|
||||||
/// then we allow the access. This allows too much code in two ways:
|
/// then we allow the access. This allows too much code in two ways:
|
||||||
/// - The same wildcard pointer can "take the role" of multiple different exposed pointers on
|
/// - The same wildcard pointer can "take the role" of multiple different exposed pointers on
|
||||||
/// subsequenct memory accesses.
|
/// subsequent memory accesses.
|
||||||
/// - In the aliasing model, we don't just have to know the borrow tag of the pointer used for
|
/// - In the aliasing model, we don't just have to know the borrow tag of the pointer used for
|
||||||
/// the access, we also have to update the aliasing state -- and that update can be very
|
/// the access, we also have to update the aliasing state -- and that update can be very
|
||||||
/// different depending on which borrow tag we pick! Stacked Borrows has support for this by
|
/// different depending on which borrow tag we pick! Stacked Borrows has support for this by
|
||||||
/// switching to a stack that is only approximately known, i.e. we overapproximate the effect
|
/// switching to a stack that is only approximately known, i.e. we over-approximate the effect
|
||||||
/// of using *any* exposed pointer for this access, and only keep information about the borrow
|
/// of using *any* exposed pointer for this access, and only keep information about the borrow
|
||||||
/// stack that would be true with all possible choices.
|
/// stack that would be true with all possible choices.
|
||||||
Wildcard,
|
Wildcard,
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
//! calls to munmap, but for a very different reason. In principle, according to the man pages, it
|
//! calls to munmap, but for a very different reason. In principle, according to the man pages, it
|
||||||
//! is possible to unmap arbitrary regions of address space. But in a high-level language like Rust
|
//! is possible to unmap arbitrary regions of address space. But in a high-level language like Rust
|
||||||
//! this amounts to partial deallocation, which LLVM does not support. So any attempt to call our
|
//! this amounts to partial deallocation, which LLVM does not support. So any attempt to call our
|
||||||
//! munmap shim which would partily unmap a region of address space previously mapped by mmap will
|
//! munmap shim which would partially unmap a region of address space previously mapped by mmap will
|
||||||
//! report UB.
|
//! report UB.
|
||||||
|
|
||||||
use crate::*;
|
use crate::*;
|
||||||
@ -78,7 +78,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
|
|||||||
// * The implementation does not support the combination of accesses requested in the
|
// * The implementation does not support the combination of accesses requested in the
|
||||||
// prot argument.
|
// prot argument.
|
||||||
//
|
//
|
||||||
// Miri doesn't support MAP_FIXED or any any protections other than PROT_READ|PROT_WRITE.
|
// Miri doesn't support MAP_FIXED or any protections other than PROT_READ|PROT_WRITE.
|
||||||
if flags & map_fixed != 0 || prot != prot_read | prot_write {
|
if flags & map_fixed != 0 || prot != prot_read | prot_write {
|
||||||
this.set_last_error(this.eval_libc("ENOTSUP"))?;
|
this.set_last_error(this.eval_libc("ENOTSUP"))?;
|
||||||
return Ok(this.eval_libc("MAP_FAILED"));
|
return Ok(this.eval_libc("MAP_FAILED"));
|
||||||
|
@ -390,7 +390,7 @@ fn reacquire_cond_mutex<'mir, 'tcx: 'mir>(
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// After a thread waiting on a condvar was signalled:
|
/// After a thread waiting on a condvar was signaled:
|
||||||
/// Reacquire the conditional variable and remove the timeout callback if any
|
/// Reacquire the conditional variable and remove the timeout callback if any
|
||||||
/// was registered.
|
/// was registered.
|
||||||
fn post_cond_signal<'mir, 'tcx: 'mir>(
|
fn post_cond_signal<'mir, 'tcx: 'mir>(
|
||||||
|
@ -757,7 +757,7 @@ fn int_abs<'tcx>(
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Splits `op` (which must be a SIMD vector) into 128-bit chuncks.
|
/// Splits `op` (which must be a SIMD vector) into 128-bit chunks.
|
||||||
///
|
///
|
||||||
/// Returns a tuple where:
|
/// Returns a tuple where:
|
||||||
/// * The first element is the number of 128-bit chunks (let's call it `N`).
|
/// * The first element is the number of 128-bit chunks (let's call it `N`).
|
||||||
@ -788,7 +788,7 @@ fn split_simd_to_128bit_chunks<'tcx, P: Projectable<'tcx, Provenance>>(
|
|||||||
Ok((num_chunks, items_per_chunk, chunked_op))
|
Ok((num_chunks, items_per_chunk, chunked_op))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Horizontaly performs `which` operation on adjacent values of
|
/// Horizontally performs `which` operation on adjacent values of
|
||||||
/// `left` and `right` SIMD vectors and stores the result in `dest`.
|
/// `left` and `right` SIMD vectors and stores the result in `dest`.
|
||||||
/// "Horizontal" means that the i-th output element is calculated
|
/// "Horizontal" means that the i-th output element is calculated
|
||||||
/// from the elements 2*i and 2*i+1 of the concatenation of `left` and
|
/// from the elements 2*i and 2*i+1 of the concatenation of `left` and
|
||||||
@ -1256,7 +1256,7 @@ fn packusdw<'tcx>(
|
|||||||
|
|
||||||
/// Negates elements from `left` when the corresponding element in
|
/// Negates elements from `left` when the corresponding element in
|
||||||
/// `right` is negative. If an element from `right` is zero, zero
|
/// `right` is negative. If an element from `right` is zero, zero
|
||||||
/// is writen to the corresponding output element.
|
/// is written to the corresponding output element.
|
||||||
/// In other words, multiplies `left` with `right.signum()`.
|
/// In other words, multiplies `left` with `right.signum()`.
|
||||||
fn psign<'tcx>(
|
fn psign<'tcx>(
|
||||||
this: &mut crate::MiriInterpCx<'_, 'tcx>,
|
this: &mut crate::MiriInterpCx<'_, 'tcx>,
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
struct Bar;
|
struct Bar;
|
||||||
struct Qux;
|
struct Qux;
|
||||||
|
|
||||||
// Tests for a a non generic trait
|
// Tests for a non generic trait
|
||||||
pub trait Tr1 {
|
pub trait Tr1 {
|
||||||
type A;
|
type A;
|
||||||
fn boo(&self) -> <Self as Tr1>::A;
|
fn boo(&self) -> <Self as Tr1>::A;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
//! A regression test for #120343. The overlap error was previously
|
//! A regression test for #120343. The overlap error was previously
|
||||||
//! silenced in coherence because projecting `<() as ToUnit>::Unit`
|
//! silenced in coherence because projecting `<() as ToUnit>::Unit`
|
||||||
//! failed. Then then silenced the missing items error in the `ToUnit`
|
//! failed. Then silenced the missing items error in the `ToUnit`
|
||||||
//! impl, causing us to not emit any errors and ICEing due to a
|
//! impl, causing us to not emit any errors and ICEing due to a
|
||||||
//! `span_delay_bug`.
|
//! `span_delay_bug`.
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ fn function3<T: Trait<'static, Assoc = usize>>() {
|
|||||||
// Trying to normalize the type `for<'a> fn(<T as Trait<'a>>::Assoc)`
|
// Trying to normalize the type `for<'a> fn(<T as Trait<'a>>::Assoc)`
|
||||||
// only gets to `<T as Trait<'a>>::Assoc` once `'a` has been already
|
// only gets to `<T as Trait<'a>>::Assoc` once `'a` has been already
|
||||||
// instantiated, causing us to prefer the where-bound over the impl
|
// instantiated, causing us to prefer the where-bound over the impl
|
||||||
// resulting in a placeholder error. Even if were were to also use the
|
// resulting in a placeholder error. Even if we were to also use the
|
||||||
// leak check during candidate selection for normalization, this
|
// leak check during candidate selection for normalization, this
|
||||||
// case would still not compile.
|
// case would still not compile.
|
||||||
let _higher_ranked_norm: for<'a> fn(<T as Trait<'a>>::Assoc) = |_| ();
|
let _higher_ranked_norm: for<'a> fn(<T as Trait<'a>>::Assoc) = |_| ();
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Note: it's ok to interpret 'a as 'a', but but not ok to interpret 'abc as
|
// Note: it's ok to interpret 'a as 'a', but not ok to interpret 'abc as
|
||||||
// 'abc' because 'abc' is not a valid char literal.
|
// 'abc' because 'abc' is not a valid char literal.
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// User type annotation in fn bodies is a a valid defining site for opaque types.
|
// User type annotation in fn bodies is a valid defining site for opaque types.
|
||||||
//@ check-pass
|
//@ check-pass
|
||||||
#![feature(type_alias_impl_trait)]
|
#![feature(type_alias_impl_trait)]
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ mod mod3 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// This is similar to the previous cases in that 'a is equal to 'static,
|
// This is similar to the previous cases in that 'a is equal to 'static,
|
||||||
// which is is some sense an implicit parameter to `Opaque`.
|
// which is some sense an implicit parameter to `Opaque`.
|
||||||
// For example, given a defining use `Opaque<'a> := &'a ()`,
|
// For example, given a defining use `Opaque<'a> := &'a ()`,
|
||||||
// it is ambiguous whether `Opaque<'a> := &'a ()` or `Opaque<'a> := &'static ()`
|
// it is ambiguous whether `Opaque<'a> := &'a ()` or `Opaque<'a> := &'static ()`
|
||||||
mod mod4 {
|
mod mod4 {
|
||||||
|
Loading…
Reference in New Issue
Block a user