Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 9 pull requests #94567

Closed
wants to merge 25 commits into from
Closed
Changes from 2 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
55f938b
update docs for `simplify_type`
lcnr Feb 21, 2022
ba2e0ca
typo
lcnr Feb 21, 2022
bac5523
Use cgroup quotas for calculating `available_parallelism`
the8472 Jan 9, 2022
af6d2ed
hardcode /sys/fs/cgroup instead of doing a lookup via mountinfo
the8472 Mar 2, 2022
e18abbf
update available_parallelism docs since cgroups and sched_getaffinity…
the8472 Mar 2, 2022
37c1eb0
Doc: Fix use of quote instead of backstick in Adapter::map.
darnuria Mar 3, 2022
e3f04de
Add test for higher kinded functions generated by macros
GuillaumeGomez Mar 3, 2022
11c565f
Improve if/else formatting in macro_parser.rs.
nnethercote Mar 3, 2022
b9fabc3
Add a static size assertion for `MatcherPos`.
nnethercote Mar 3, 2022
643ba50
Introduce `MatcherPosRepetition`.
nnethercote Mar 3, 2022
e5f3fd6
Use a better return type for `inner_parse_loop`.
nnethercote Mar 3, 2022
97eb1b4
Change `initial_matcher_pos()` into `MatcherPos::new()`.
nnethercote Mar 3, 2022
5164884
Fix invalid lint_node_id being put on a removed stmt
Urgau Mar 3, 2022
188ae00
add tests for #94502
lcnr Mar 3, 2022
00fffdd
all: fix some typos
cuishuang Mar 3, 2022
ff19c05
remove a unnecessary `..` pattern
TaKO8Ki Mar 3, 2022
f776177
Rollup merge of #92697 - the8472:cgroups, r=joshtriplett
matthiaskrgr Mar 3, 2022
55ddf7d
Rollup merge of #94057 - lcnr:simplify_type-uwu, r=nikomatsakis
matthiaskrgr Mar 3, 2022
c1cac49
Rollup merge of #94547 - nnethercote:parse_tt-cleanups, r=petrochenkov
matthiaskrgr Mar 3, 2022
770a7ec
Rollup merge of #94550 - GuillaumeGomez:HKF-macros, r=notriddle
matthiaskrgr Mar 3, 2022
0c14a12
Rollup merge of #94551 - darnuria:doc-map-backstick, r=dtolnay
matthiaskrgr Mar 3, 2022
aaac4f9
Rollup merge of #94553 - lcnr:add-tests, r=Dylan-DPC
matthiaskrgr Mar 3, 2022
7ea81d6
Rollup merge of #94554 - Urgau:stmt-node-id-ice, r=petrochenkov
matthiaskrgr Mar 3, 2022
bb8a82e
Rollup merge of #94555 - cuishuang:master, r=oli-obk
matthiaskrgr Mar 3, 2022
2894281
Rollup merge of #94563 - TaKO8Ki:remove-unnecessary-patten-for-ignori…
matthiaskrgr Mar 3, 2022
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
23 changes: 23 additions & 0 deletions src/test/ui/nll/lint-no-err.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// check-pass

// mir borrowck previously incorrectly set `tainted_by_errors`
// when buffering lints, which resulted in ICE later on,
// see #94502.

struct Repro;
impl Repro {
fn get(&self) -> &i32 {
&3
}

fn insert(&mut self, _: i32) {}
}

fn main() {
let x = &0;
let mut conflict = Repro;
let prev = conflict.get();
conflict.insert(*prev + *x);
//~^ WARN cannot borrow `conflict` as mutable because it is also borrowed as immutable
//~| WARN this borrowing pattern was not meant to be accepted
}
17 changes: 17 additions & 0 deletions src/test/ui/nll/lint-no-err.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
warning: cannot borrow `conflict` as mutable because it is also borrowed as immutable
--> $DIR/lint-no-err.rs:20:5
|
LL | let prev = conflict.get();
| -------------- immutable borrow occurs here
LL | conflict.insert(*prev + *x);
| ^^^^^^^^^^^^^^^^-----^^^^^^
| | |
| | immutable borrow later used here
| mutable borrow occurs here
|
= note: `#[warn(mutable_borrow_reservation_conflict)]` on by default
= warning: this borrowing pattern was not meant to be accepted, and may become a hard error in the future
= note: for more information, see issue #59159 <https://github.com/rust-lang/rust/issues/59159>

warning: 1 warning emitted