Commit Graph

108135 Commits

Author SHA1 Message Date
Ralf Jung
59350e4ae2 increase slack for stack size test 2020-03-14 14:05:26 +01:00
Ralf Jung
058ff728dc debug-assert ptr sanity in ptr::write 2020-03-14 14:05:26 +01:00
bors
1572c433ee Auto merge of #69986 - JohnTitor:rollup-h0809mf, r=JohnTitor
Rollup of 12 pull requests

Successful merges:

 - #69403 (Implement `Copy` for `IoSlice`)
 - #69460 (Move some `build-pass` tests to `check-pass`)
 - #69723 (Added doc on keyword Pub.)
 - #69802 (fix more clippy findings)
 - #69809 (remove lifetimes that can be elided (clippy::needless_lifetimes))
 - #69947 (Clean up E0423 explanation)
 - #69949 (triagebot.toml: add ping aliases)
 - #69954 (rename panic_if_ intrinsics to assert_)
 - #69960 (miri engine: fix treatment of abort intrinsic)
 - #69966 (Add more regression tests)
 - #69973 (Update stable-since version for const_int_conversion)
 - #69974 (Clean up E0434 explanation)

Failed merges:

r? @ghost
2020-03-13 19:16:03 +00:00
Yuki Okushi
1d8f5f0ff5
Rollup merge of #69974 - GuillaumeGomez:cleanup-e0434, r=Dylan-DPC
Clean up E0434 explanation

r? @Dylan-DPC
2020-03-14 04:03:37 +09:00
Yuki Okushi
b0d1fc57eb
Rollup merge of #69973 - tspiteri:const-int-conversion-since, r=dtolnay
Update stable-since version for const_int_conversion

Since #69373 was not merged in time for 1.43.0 beta, update to `since = "1.44.0"`.
2020-03-14 04:03:36 +09:00
Yuki Okushi
93da9d7fe1
Rollup merge of #69966 - JohnTitor:more-more-tests, r=Centril
Add more regression tests

Closes #58490, closes #60390, closes #62504, closes #67739, closes #69092

r? @Centril
2020-03-14 04:03:34 +09:00
Yuki Okushi
f2af2cff0f
Rollup merge of #69960 - RalfJung:abort, r=oli-obk
miri engine: fix treatment of abort intrinsic

I screwed up in https://github.com/rust-lang/rust/pull/69830 and added `abort` to the wrong block of intrinsics, namely the one that actually has a return place. So that branch was never actually reached.

r? @oli-obk
2020-03-14 04:03:33 +09:00
Yuki Okushi
77263db96f
Rollup merge of #69954 - RalfJung:panic_if-assert, r=Centril,eddyb
rename panic_if_ intrinsics to assert_

[Suggested by @eddyb](https://github.com/rust-lang/miri/issues/1222#issuecomment-598087523)
2020-03-14 04:03:31 +09:00
Yuki Okushi
995e584678
Rollup merge of #69949 - rust-lang:triagebot-ping-alias, r=Mark-Simulacrum
triagebot.toml: add ping aliases

I think I got the syntax right.
Closes https://github.com/rust-lang/triagebot/issues/402.

r? @Mark-Simulacrum
cc @pnkfelix
2020-03-14 04:03:29 +09:00
Yuki Okushi
78d722f0c7
Rollup merge of #69947 - GuillaumeGomez:cleanup-e0423, r=Dylan-DPC
Clean up E0423 explanation

r? @Dylan-DPC
2020-03-14 04:03:28 +09:00
Yuki Okushi
c13548dccd
Rollup merge of #69809 - matthiaskrgr:lifetimes, r=eddyb
remove lifetimes that can be elided (clippy::needless_lifetimes)
2020-03-14 04:03:26 +09:00
Yuki Okushi
8e17c8366c
Rollup merge of #69802 - matthiaskrgr:cl1ppy, r=Dylan-DPC
fix more clippy findings

* reduce references on match patterns (clippy::match_ref_pats)
* Use writeln!(fmt, "word") instead of write!(fmt, "word\n") (clippy::write_with_newline)
* libtest: remove redundant argument to writeln!() (clippy::writeln_empty_string)
* remove unneeded mutable references (cippy::unnecessary_mut_passed)
* libtest: declare variables as floats instead of casting them (clippy::unnecessary_cast)
* rustdoc: remove redundant static lifetimes (clippy::redundant_static_lifetimes)
* call .as_deref() instead of .as_ref().map(Deref::deref) (clippy::option_as_ref_deref)
* iterate over a maps values directly. (clippy::for_kv_map)
* rustdoc: simplify boolean condition (clippy::nonminimal_bool)
* Use ?-operator in more places (clippy::question_mark, had some false negatives fixed recently)
* rustdoc: Use .any(p) instead of find(p).is_some(). (clippy::search_is_some)
* rustdoc: don't call into_iter() on iterator. (clippy::identity_conversion)
2020-03-14 04:03:24 +09:00
Yuki Okushi
35df9cca7c
Rollup merge of #69723 - sjud:sjud-doc-request, r=Mark-Simulacrum
Added doc on keyword Pub.

Hi, this is my first pull request. I hope it's OK. Please let me know if it would benefit from any changes. Thank you.
2020-03-14 04:03:23 +09:00
Yuki Okushi
913a933202
Rollup merge of #69460 - LeSeulArtichaut:move-compile-pass, r=RalfJung
Move some `build-pass` tests to `check-pass`

Helps with #62277.

r? @cramertj cc @Centril
2020-03-14 04:03:22 +09:00
Yuki Okushi
5d90154886
Rollup merge of #69403 - LeSeulArtichaut:copy-ioslice, r=sfackler
Implement `Copy` for `IoSlice`

Resolves #69395

r? @sfackler
2020-03-14 04:03:20 +09:00
bors
d6072319a9 Auto merge of #69155 - chrissimpkins:llvm-globals, r=eddyb
Add support for LLVM globals corresponding to miri allocations should be named alloc123

Adds support for this request from @eddyb in #69134:

> That is, if -Zfewer-names is false (usually only because of --emit=llvm-ir), we should use the same name for LLVM globals we generate out of miri allocs as #67133 does in MIR output (allocN).
>
>This way, we can easily see the mapping between MIR and LLVM IR (and it shouldn't be any costlier for regular compilation, which would continue to use unnamed globals).

r? @eddyb
cc @oli-obk
2020-03-13 16:10:20 +00:00
sjud
87f8ee675e Add documentation for pub keyword 2020-03-13 11:12:59 -04:00
Guillaume Gomez
a36bf9c1b8 Clean up E0434 explanation 2020-03-13 14:36:14 +01:00
Trevor Spiteri
08a7fa6dd8 update stable-since version for const_int_conversion 2020-03-13 14:25:35 +01:00
Ralf Jung
13ea774513 bless tests 2020-03-13 08:52:04 +01:00
Ralf Jung
f61fb53af4 adjust enum naming 2020-03-13 08:43:27 +01:00
Yuki Okushi
7c987eb020
Add test for issue-69092 2020-03-13 16:06:09 +09:00
Yuki Okushi
3609bac340
Add test for issue-67739 2020-03-13 16:06:08 +09:00
Yuki Okushi
a2c41e9cdc
Add test for issue-62504 2020-03-13 16:06:08 +09:00
Yuki Okushi
0efc2cf547
Add test for issue-60390 2020-03-13 16:06:08 +09:00
Yuki Okushi
081e32baba
Add test for issue-58490 2020-03-13 16:06:07 +09:00
Ralf Jung
e9c96570d6 miri engine: fix treatment of abort intrinsic 2020-03-12 21:22:22 +01:00
Matthias Krüger
7b1b08cfee remove lifetimes that can be elided (clippy::needless_lifetimes) 2020-03-12 20:03:09 +01:00
Ralf Jung
f32cccc05e rename panic_if_ intrinsics to assert_ 2020-03-12 19:38:09 +01:00
Mazdak Farrokhzad
90e8058716
triagebot.toml: add typo aliases 2020-03-12 18:06:40 +01:00
LeSeulArtichaut
8f0fa24d7b Move some more tests to check-pass 2020-03-12 17:22:44 +01:00
bors
54b7d21f59 Auto merge of #69950 - Centril:rollup-xh0hmvx, r=Centril
Rollup of 10 pull requests

Successful merges:

 - #68899 (Add Display and Error impls for proc_macro::LexError)
 - #69011 (Document unsafe blocks in core::fmt)
 - #69674 (Rename DefKind::Method and TraitItemKind::Method )
 - #69705 (Toolstate: remove redundant beta-week check.)
 - #69722 (Tweak output for invalid negative impl AST errors)
 - #69747 (Rename rustc guide)
 - #69792 (Implement Error for TryReserveError)
 - #69830 (miri: ICE on invalid terminators)
 - #69921 (rustdoc: remove unused import)
 - #69945 (update outdated comment)

Failed merges:

r? @ghost
2020-03-12 16:20:52 +00:00
LeSeulArtichaut
7326e530f2 Move some const-eval build-pass tests to check-pass 2020-03-12 16:58:34 +01:00
Mazdak Farrokhzad
9463cf3361
Rollup merge of #69945 - contrun:fix-outdated-comment, r=petrochenkov
update outdated comment
2020-03-12 16:32:27 +01:00
Mazdak Farrokhzad
841f212b50
Rollup merge of #69921 - matthiaskrgr:rustdoc_import, r=Centril
rustdoc: remove unused import

```
    Checking rustdoc v0.0.0 (/home/matthias/vcs/github/rust/src/librustdoc)
warning: unused import: `rustc_span::symbol::sym`
  --> src/librustdoc/clean/inline.rs:15:5
   |
15 | use rustc_span::symbol::sym;
   |     ^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default
```
2020-03-12 16:32:25 +01:00
Mazdak Farrokhzad
fac7122682
Rollup merge of #69830 - RalfJung:miri-invalid-terminator, r=oli-obk
miri: ICE on invalid terminators

We've run a lot of MIR in Miri (including some generators) and never seen these.

@tmandry is it correct that `Yield` and `GeneratorDrop` get lowered away?

@eddyb @oli-obk what's with this `Abort` that does not seem to ever actually exist? Codegen *does* seem to handle it, so I wonder why Miri can get away without that. In fact, codegen handles it twice:

1d5241c962/src/librustc_codegen_ssa/mir/block.rs (L796)

1d5241c962/src/librustc_codegen_ssa/mir/mod.rs (L296)
2020-03-12 16:32:23 +01:00
Mazdak Farrokhzad
d21320cbd9
Rollup merge of #69792 - LenaWil:try_reserve_error/impl-error, r=sfackler
Implement Error for TryReserveError

I noticed that the Error trait wasn't implemented for TryReserveError. (#48043)

Not sure if the error messages and code style are 100% correct, it's my first time contributing to the Rust std.
2020-03-12 16:32:21 +01:00
Mazdak Farrokhzad
39c6405097
Rollup merge of #69747 - spastorino:rename-rustc-guide, r=pietroalbini
Rename rustc guide

This is in preparation for https://github.com/rust-lang/rustc-guide/issues/470
Needs to be merged after we actually rename the guide.

Have used this to rename:

`git grep -l 'rustc_guide' | xargs sed -i 's/rustc_guide/rustc_dev_guide/g'`
`git grep -l 'rustc-guide' | xargs sed -i 's/rustc-guide/rustc-dev-guide/g'`
`git grep -l 'rustc guide' | xargs sed -i 's/rustc guide/rustc dev guide/g'`
2020-03-12 16:32:19 +01:00
Mazdak Farrokhzad
4f7fc5ad67
Rollup merge of #69722 - estebank:negative-impl-span-ast, r=Centril
Tweak output for invalid negative impl AST errors

Use more accurate spans for negative `impl` errors.

r? @Centril
2020-03-12 16:32:17 +01:00
Mazdak Farrokhzad
3d23de7baf
Rollup merge of #69705 - ehuss:toolstate-remove-redundant-beta, r=Mark-Simulacrum
Toolstate: remove redundant beta-week check.

I made a bit of a mistake in #69624.  The "beta regression" doesn't need to be checked twice.

I also rolled up #69693 to avoid merge conflicts.
2020-03-12 16:32:15 +01:00
Mazdak Farrokhzad
9bc7386970
Rollup merge of #69674 - mark-i-m:assoc-fn, r=matthewjasper
Rename DefKind::Method and TraitItemKind::Method

r? @eddyb, @Centril, or @matthewjasper

cc #69498 #60163
2020-03-12 16:32:13 +01:00
Mazdak Farrokhzad
156a05a2e7
Rollup merge of #69011 - foeb:document-unsafe-core-fmt, r=Mark-Simulacrum
Document unsafe blocks in core::fmt

r? @RalfJung
CC: @rust-lang/wg-unsafe-code-guidelines
#66219

Sorry for the hiatus, but here's a few more files with the unsafe blocks documented! I think working on it smaller chunks like this will be easier for everyone.
2020-03-12 16:32:11 +01:00
Mazdak Farrokhzad
703dcff081
Rollup merge of #68899 - kinseytamsin:lexerror-error-impl, r=Centril
Add Display and Error impls for proc_macro::LexError

This should allow LexError to play much nicer with the `?` operator.

Fixes #68896.

(I'm not sure if I did the stability attributes right, so if I need to change them, please let me know!)
2020-03-12 16:32:07 +01:00
Mazdak Farrokhzad
118003d2dc
triagebot.toml: add ping aliases 2020-03-12 16:22:12 +01:00
Chris Simpkins
cf929f77bf support LLVM globals corresponding to miri allocations 2020-03-12 09:57:05 -04:00
Guillaume Gomez
611cfd5f15 Clean up E0423 explanation 2020-03-12 13:11:07 +01:00
YI
d7100d6099 update outdated comment 2020-03-12 18:43:51 +08:00
bors
23de8275c9 Auto merge of #68551 - Marwes:allocations_mir, r=ecstatic-morse
perf: Reuse a Vec in mir simplification

Just moves the vec out of the outer loop so it is reused every iteration
2020-03-12 09:16:53 +00:00
bors
e5e8ba4edc Auto merge of #68191 - simlay:add-tvSO-target, r=nagisa
Added tvOS as targets

This is a first attempt of adding support tvOS as described in #48862. It's got a lot of overlap with [src/librustc_target/spec/apple_ios_base.rs](31dd4f4acb/src/librustc_target/spec/apple_ios_base.rs).

I thought about refactoring `apple_ios_base.rs` to include this as well but that would require each of the ios and tvos targets to be of the something like the form `let base = opts(AppleOS::TV, Arch::Arm64)?;` I also did the same thing for watchOS because from what I can tell, all three targets (iOS, tvOS, and watchOS) have the same logic but have different parameters being sent to `xcrun`. Thoughts?

As far as the `data_layout` and other parameters to `Target`, I did as much research as I could but it really seems that processor in the [iPhone 11 is the same as the apple TV](https://en.wikipedia.org/wiki/Apple-designed_processors) so I didn't change any of those parameters.

I did get this to build and tested that it's actually running the the below logic (because the parameter to `xcrun` is `appletvos` not `tvos`).

I didn't manage to get it to actually compile a file with `fn main(){}` because I don't have the stdlib for `aarch64-apple-tvos` compiled it seems. Is there documentation for this?

Similar to the ending of https://github.com/rust-lang/rust/pull/63467, I'm not sure what to do next.
2020-03-12 04:01:02 +00:00
Kinsey Favre
5099ab6e6b
Give LexError more descriptive Display impl 2020-03-11 11:57:58 -05:00