Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions compiler/rustc_hir_typeck/src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2720,12 +2720,12 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
/// Check field access expressions, this works for both structs and tuples.
/// Returns the Ty of the field.
///
/// ```not_rust
/// base.field
/// ^^^^^^^^^^ expr
/// ^^^^ base
/// ^^^^^ field
/// ```
/// ```ignore (illustrative)
/// base.field
/// ^^^^^^^^^^ expr
/// ^^^^ base
/// ^^^^^ field
/// ```
fn check_expr_field(
&self,
expr: &'tcx hir::Expr<'tcx>,
Expand Down
5 changes: 4 additions & 1 deletion compiler/rustc_resolve/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,15 +193,18 @@ enum ImplTraitContext {
}

/// Used for tracking import use types which will be used for redundant import checking.
///
/// ### Used::Scope Example
/// ```rust,compile_fail
///
/// ```rust,compile_fail
/// #![deny(redundant_imports)]
/// use std::mem::drop;
/// fn main() {
/// let s = Box::new(32);
/// drop(s);
/// }
/// ```
///
/// Used::Other is for other situations like module-relative uses.
#[derive(Clone, Copy, PartialEq, PartialOrd, Debug)]
enum Used {
Expand Down
Loading