mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 08:44:35 +00:00
fix some typos
This commit is contained in:
parent
b1ab3b738a
commit
62a2a1d257
@ -27,7 +27,7 @@ pub struct SsoHashSet<T> {
|
|||||||
map: SsoHashMap<T, ()>,
|
map: SsoHashMap<T, ()>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Adapter function used ot return
|
/// Adapter function used to return
|
||||||
/// result if SsoHashMap functions into
|
/// result if SsoHashMap functions into
|
||||||
/// result SsoHashSet should return.
|
/// result SsoHashSet should return.
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
|
@ -51,7 +51,7 @@ impl<'tcx> TyCtxt<'tcx> {
|
|||||||
|
|
||||||
match ty::Instance::resolve_opt_const_arg(
|
match ty::Instance::resolve_opt_const_arg(
|
||||||
self, param_env,
|
self, param_env,
|
||||||
// FIXME: maybe have a seperate version for resolving mir::UnevaluatedConst?
|
// FIXME: maybe have a separate version for resolving mir::UnevaluatedConst?
|
||||||
ct.def, ct.substs,
|
ct.def, ct.substs,
|
||||||
) {
|
) {
|
||||||
Ok(Some(instance)) => {
|
Ok(Some(instance)) => {
|
||||||
|
@ -264,7 +264,7 @@ fn project_and_unify_type<'cx, 'tcx>(
|
|||||||
};
|
};
|
||||||
debug!(?normalized, ?obligations, "project_and_unify_type result");
|
debug!(?normalized, ?obligations, "project_and_unify_type result");
|
||||||
let actual = obligation.predicate.term;
|
let actual = obligation.predicate.term;
|
||||||
// For an example where this is neccessary see src/test/ui/impl-trait/nested-return-type2.rs
|
// For an example where this is necessary see src/test/ui/impl-trait/nested-return-type2.rs
|
||||||
// This allows users to omit re-mentioning all bounds on an associated type and just use an
|
// This allows users to omit re-mentioning all bounds on an associated type and just use an
|
||||||
// `impl Trait` for the assoc type to add more bounds.
|
// `impl Trait` for the assoc type to add more bounds.
|
||||||
let InferOk { value: actual, obligations: new } =
|
let InferOk { value: actual, obligations: new } =
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// check-fail
|
// check-fail
|
||||||
// known-bug
|
// known-bug
|
||||||
|
|
||||||
// We almost certaintly want this to pass, but
|
// We almost certainly want this to pass, but
|
||||||
// it's particularly difficult currently, because we need a way of specifying
|
// it's particularly difficult currently, because we need a way of specifying
|
||||||
// that `<Self::Base as Functor>::With<T> = Self` without using that when we have
|
// that `<Self::Base as Functor>::With<T> = Self` without using that when we have
|
||||||
// a `U`. See `https://github.com/rust-lang/rust/pull/92728` for a (hacky)
|
// a `U`. See `https://github.com/rust-lang/rust/pull/92728` for a (hacky)
|
||||||
|
@ -11,7 +11,7 @@ fn main() {
|
|||||||
|
|
||||||
// Ensure that uninhabited types do not "diverge".
|
// Ensure that uninhabited types do not "diverge".
|
||||||
// This might be relaxed in the future, but when it is,
|
// This might be relaxed in the future, but when it is,
|
||||||
// it should be an explicitly wanted descision.
|
// it should be an explicitly wanted decision.
|
||||||
let Some(x) = Some(1) else { foo::<Uninhabited>() }; //~ ERROR does not diverge
|
let Some(x) = Some(1) else { foo::<Uninhabited>() }; //~ ERROR does not diverge
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
error[E0308]: mismatched types
|
error[E0308]: mismatched types
|
||||||
--> $DIR/multiple-occurence-ambiguousity.rs:21:26
|
--> $DIR/multiple-occurrence-ambiguousity.rs:21:26
|
||||||
|
|
|
|
||||||
LL | let t: &dyn Bar<_> = s;
|
LL | let t: &dyn Bar<_> = s;
|
||||||
| ----------- ^ expected trait `Bar`, found trait `Foo`
|
| ----------- ^ expected trait `Bar`, found trait `Foo`
|
Loading…
Reference in New Issue
Block a user