Nits
This commit is contained in:
parent
a9dbf63087
commit
f624d55ea7
3 changed files with 15 additions and 1 deletions
|
@ -64,6 +64,7 @@ impl<'tcx, T: ?Sized + TraitEngine<'tcx>> T {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[must_use]
|
||||||
fn select_all_or_error(&mut self, infcx: &InferCtxt<'tcx>) -> Vec<FulfillmentError<'tcx>> {
|
fn select_all_or_error(&mut self, infcx: &InferCtxt<'tcx>) -> Vec<FulfillmentError<'tcx>> {
|
||||||
let errors = self.select_where_possible(infcx);
|
let errors = self.select_where_possible(infcx);
|
||||||
if !errors.is_empty() {
|
if !errors.is_empty() {
|
||||||
|
|
|
@ -68,7 +68,14 @@ pub(crate) fn extension(
|
||||||
|
|
||||||
/// Only keep `#[doc]` attrs.
|
/// Only keep `#[doc]` attrs.
|
||||||
fn scrub_attrs(attrs: &[Attribute]) -> Vec<Attribute> {
|
fn scrub_attrs(attrs: &[Attribute]) -> Vec<Attribute> {
|
||||||
attrs.into_iter().cloned().filter(|attr| attr.path().segments[0].ident == "doc").collect()
|
attrs
|
||||||
|
.into_iter()
|
||||||
|
.cloned()
|
||||||
|
.filter(|attr| {
|
||||||
|
let ident = &attr.path().segments[0].ident;
|
||||||
|
ident == "doc" || ident == "must_use"
|
||||||
|
})
|
||||||
|
.collect()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Scrub arguments so that they're valid for trait signatures.
|
/// Scrub arguments so that they're valid for trait signatures.
|
||||||
|
|
|
@ -37,6 +37,12 @@ impl<'cx, 'tcx> At<'cx, 'tcx> {
|
||||||
/// normalizing, but for now should be used only when we actually
|
/// normalizing, but for now should be used only when we actually
|
||||||
/// know that normalization will succeed, since error reporting
|
/// know that normalization will succeed, since error reporting
|
||||||
/// and other details are still "under development".
|
/// and other details are still "under development".
|
||||||
|
///
|
||||||
|
/// This normalization should *only* be used when the projection does not
|
||||||
|
/// have possible ambiguity or may not be well-formed.
|
||||||
|
///
|
||||||
|
/// After codegen, when lifetimes do not matter, it is preferable to instead
|
||||||
|
/// use [`TyCtxt::normalize_erasing_regions`], which wraps this procedure.
|
||||||
fn query_normalize<T>(self, value: T) -> Result<Normalized<'tcx, T>, NoSolution>
|
fn query_normalize<T>(self, value: T) -> Result<Normalized<'tcx, T>, NoSolution>
|
||||||
where
|
where
|
||||||
T: TypeFoldable<TyCtxt<'tcx>>,
|
T: TypeFoldable<TyCtxt<'tcx>>,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue