rust/compiler/rustc_borrowck/src
dianne 2ab8480605 Suggest borrowing arguments in generic positions when trait bounds are satisfied
This subsumes the suggestions to borrow arguments with `AsRef`/`Borrow` bounds and those to borrow
arguments with `Fn` and `FnMut` bounds. It works for other traits implemented on references as well,
such as `std::io::Read`, `std::io::Write`, and `core::fmt::Write`.

Incidentally, by making the logic for suggesting borrowing closures general, this removes some
spurious suggestions to mutably borrow `FnMut` closures in assignments, as well as an unhelpful
suggestion to add a `Clone` constraint to an `impl Fn` argument.
2024-11-13 20:29:40 -08:00
..
constraints Reduce visibilities. 2024-11-04 15:43:45 +11:00
diagnostics Suggest borrowing arguments in generic positions when trait bounds are satisfied 2024-11-13 20:29:40 -08:00
polonius various fixes for naked_asm! implementation 2024-10-06 19:00:09 +02:00
region_infer Get rid of check_opaque_type_well_formed 2024-11-08 03:46:27 +00:00
type_check Auto merge of #132580 - compiler-errors:globs, r=Noratrieb 2024-11-05 08:30:56 +00:00
util Add warn(unreachable_pub) to rustc_borrowck. 2024-08-16 08:46:57 +10:00
borrow_set.rs Reduce visibilities. 2024-11-04 15:43:45 +11:00
borrowck_errors.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
consumers.rs Avoid Rc in BodyWithBorrowckFacts. 2024-10-04 16:48:16 +10:00
dataflow.rs Tidy up comments and some formatting. 2024-11-04 17:36:25 +11:00
def_use.rs Rollup merge of #126013 - nnethercote:unreachable_pub, r=Urgau 2024-08-27 00:41:57 +02:00
facts.rs Dogfood feature(file_buffered) 2024-09-24 14:25:16 -07:00
lib.rs BorrowckDiags tweaks. 2024-11-04 17:36:25 +11:00
location.rs Remove #[macro_use] extern crate tracing from rustc_borrowck. 2024-08-30 17:14:53 +10:00
member_constraints.rs Remove #[macro_use] extern crate tracing from rustc_borrowck. 2024-08-30 17:14:53 +10:00
nll.rs fix clippy::clone_on_ref_ptr for compiler 2024-10-28 18:05:08 +03:00
path_utils.rs compiler: Replace rustc_target with _abi in _borrowck 2024-11-02 20:31:47 -07:00
place_ext.rs Remove #[macro_use] extern crate tracing from rustc_borrowck. 2024-08-30 17:14:53 +10:00
places_conflict.rs update rustc_borrowck::places_conflict doc-comment 2024-10-10 10:33:29 +03:00
prefixes.rs Remove unnecessary continue. 2024-11-04 17:36:25 +11:00
renumber.rs Fix some pub(crate) that were undetected bc of instrument 2024-10-04 14:02:09 -04:00
session_diagnostics.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
universal_regions.rs ty::BrK -> ty::BoundRegionKind::K 2024-11-04 04:45:52 +00:00
used_muts.rs Remove unnecessary lifetimes in dataflow structs. 2024-09-09 16:14:18 +10:00