8000 Rollup of 8 pull requests by Centril · Pull Request #62937 · rust-lang/rust · GitHub
[go: up one dir, main page]

Skip to content

Rollup of 8 pull requests #62937

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

Closed
wants to merge 51 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
8c050fc
rustc: compute `ty::layout::Niche`'s `available` on the fly.
eddyb Jul 11, 2019
dfbf464
rustc_target: move abi::Niche from rustc::ty::layout.
eddyb Jul 12, 2019
88eced5
rustc: precompute the largest Niche and store it in LayoutDetails.
eddyb Jul 15, 2019
bb9bf0c
Add riscv32i-unknown-none-elf target
Disasm Jul 18, 2019
b9784b1
Don't link mcjit/interpreter LLVM components
nikic Jul 20, 2019
c442dae
Ignore NLL migrate mode test in the Polonius compare-mode
lqd Jun 11, 2019
d4ca9a3
Ignore test issue-45983 in the polonius compare mode
lqd Jun 11, 2019
273bfd4
Ignore two-phase-reservation-sharing-interference-2.rs in Polonius co…
lqd Jun 11, 2019
63c837e
Ignore feature-gate-nll.rs in Polonius compare mode
lqd Jun 11, 2019
51c15fa
Ignore test issue-45696-scribble-on-boxed-borrow.rs in Polonius compa…
lqd Jun 11, 2019
ff350f8
Bless output of test ui/emit-artifact-notifications.rs for Polonius
lqd Jun 11, 2019
2824db1
Bless output of test save-analysis/emit-notifications.rs for Polonius
lqd Jun 11, 2019
9410104
Bless output of test nll/loan_ends_mid_block_pair.rs for Polonius
lqd Jun 11, 2019
6a7c15e
Bless output of test consts/promote_const_let.rs for Polonius
lqd Jun 12, 2019
c5a1bc1
Bless output of test nll/get_default.rs for Polonius
lqd Jun 12, 2019
292d5c1
Bless output of test generator/ref-escapes-but-not-over-yield.rs for …
lqd Jun 12, 2019
6fe5292
Bless output of test borrowck/borrowck-escaping-closure-error-2.rs f…
lqd Jun 28, 2019
7db61e7
Bless output of test borrowck/two-phase-surprise-no-conflict.rs for P…
lqd Jun 28, 2019
08c25b5
Bless output o 8000 f test dropck/dropck_trait_cycle_checked.rs for Polonius
lqd Jun 28, 2019
9a82f52
Create a dedicated polonius test folder
lqd Jul 5, 2019
6d9a4f9
Polonius facts: kill loans on Call terminators and StorageDead
lqd Jul 15, 2019
0bd2b32
Bless output of test borrowck/promote-ref-mut-in-let-issue-46557.rs …
lqd Jul 15, 2019
ed1625f
Ignore test hrtb/issue-30786.rs in Polonius compare mode
lqd Jul 15, 2019
40e6b02
Bless output of test nll/return-ref-mut-issue-46557.rs for Polonius
lqd Jul 15, 2019
9bd9b0d
Add test extracted from rand, checking that StorageDead kills loans
lqd Jul 15, 2019
606f798
Rename test so that both "kills-loans" tests match names
lqd Jul 15, 2019
9e0fb6f
Make both polonius loans tests check-pass
lqd Jul 15, 2019
823ab42
Bless output of test unboxed-closures/unboxed-closures-failed-recursi…
lqd Jul 15, 2019
2f3e36f
Polonius: generate `killed` facts for assignments to projections
lqd Jul 16, 2019
d41e002
Add test checking various assignments are accepted in Polonius
lqd Jul 16, 2019
770129c
Add test to check that assignments to projections do not kill too man…
lqd Jul 16, 2019
c7f9a71
issue-46589 passes in Polonius and fails in NLL, duplicate it and man…
lqd Jul 16, 2019
c0eab36
Bless output of test nll/loan_ends_mid_block_pair.rs for Polonius, again
lqd Jul 16, 2019
e16bede
fix tidy
lqd Jul 16, 2019
4b33968
add support for hexagon-unknown-linux-musl
androm3da Aug 10, 2018
1aeadcc
Require a value for configure --debuginfo-level
cuviper Jul 23, 2019
9073127
Break dependencies between `syntax_ext` and some other crates
petrochenkov Jul 17, 2019
2ef11ad
Move proc macro server into libsyntax
petrochenkov Jul 18, 2019
0513819
Move test harness generation into libsyntax_ext
petrochenkov Jul 18, 2019
db70c0a
Merge `rustc_allocator` into `libsyntax_ext`
petrochenkov Jul 16, 2019
28e0824
Move standard library injection into libsyntax_ext
petrochenkov Jul 18, 2019
3418aa1
syntax_ext: `proc_macro_decls` -> `proc_macro_harness`
petrochenkov Jul 18, 2019
61b680b
Attempt to fix backtrace tests on i686-msvc
alexcrichton Jul 23, 2019
0eac668
Rollup merge of #62692 - eddyb:precompute-niches, r=oli-obk
Centril Jul 24, 2019
947a3a5
Rollup merge of #62736 - lqd:polonius_tests3, r=matthewjasper
Centril Jul 24, 2019
574274f
Rollup merge of #62771 - petrochenkov:depext, r=eddyb
Centril Jul 24, 2019
b14acf4
Rollup merge of #62784 - Disasm:riscv32i, r=estebank
Centril Jul 24, 2019
f79ffa3
Rollup merge of #62814 - androm3da:hexagon_19jul_2019, r=alexcrichton
Centril Jul 24, 2019
58674e0
Rollup merge of #62827 - nikic:llvm-components, r=alexcrichton
Centril Jul 24, 2019
06ee158
Rollup merge of #62897 - alexcrichton:fix-i686-msvc-tests, r=pietroal…
Centril Jul 24, 2019
4008cf1
Rollup merge of #62906 - cuviper:debuginfo-level, r=Mark-Simulacrum
Centril Jul 24, 2019
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
Prev Previous commit
Next Next commit
Add test extracted from rand, checking that StorageDead kills loans
Like "call-kills-loans", Polonius didn't know about some `killed` facts.
  • Loading branch information
lqd committed Jul 22, 2019
commit 9bd9b0d9bf616e8a8e7f6b4c3580041b007dd868
28 changes: 28 additions & 0 deletions src/test/ui/nll/polonius/storagedead-kills-loans.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Whenever a `StorageDead` MIR statement destroys a value `x`,
// we should kill all loans of `x`. This is extracted from `rand 0.4.6`,
// is correctly accepted by NLL but was incorrectly rejected by
// Polonius because of these missing `killed` facts.

// build-pass
// compile-flags: -Z borrowck=mir -Z polonius
// ignore-compare-mode-nll

use std::{io, mem};
use std::io::Read;

fn fill(r: &mut Read, mut buf: &mut [u8]) -> io::Result<()> {
while buf.len() > 0 {
match r.read(buf).unwrap() {
0 => return Err(io::Error::new(io::ErrorKind::Other,
"end of file reached")),
n => buf = &mut mem::replace(&mut buf, &mut [])[n..],
// ^- Polonius had multiple errors on the previous line (where NLL has none)
// as it didn't know `buf` was killed here, and would
// incorrectly reject both the borrow expression, and the assignment.
}
}
Ok(())
}

fn main() {
}
0