Commit Graph

94638 Commits

Author SHA1 Message Date
Steven Fackler
72e99f57c5 Deprecate ONCE_INIT
Once::new() has been a stable const fn for a while now.

Closes #61746
2019-06-12 21:32:51 -07:00
bors
5f3656ce9a Auto merge of #61735 - eddyb:must-use-life, r=oli-obk
Add deny(unused_lifetimes) to all the crates that have deny(internal).

@Zoxc brought up, regarding #61722, that we don't force the removal of unused lifetimes.
Turns out that it's not that bad to enable for compiler crates (I wonder why it's not `warn` by default?).

I would've liked to enable `single_use_lifetimes` as well, but https://github.com/rust-lang/rust/issues/53738 makes it unusable for now.

For the `rustfmt` commit, I used https://github.com/rust-lang/rustfmt/issues/1324#issuecomment-482109952, and manually filtered out some noise.

r? @oli-obk cc @rust-lang/compiler
2019-06-11 20:45:17 +00:00
Eduard-Mihai Burtescu
1d720ec27c Run rustfmt --file-lines ... for changes from previous commits. 2019-06-11 14:11:59 +03:00
Eduard-Mihai Burtescu
630ec8880c Add deny(unused_lifetimes) to all the crates that have deny(internal). 2019-06-11 14:11:59 +03:00
Eduard-Mihai Burtescu
4a219685ff rustdoc: deny(unused_lifetimes). 2019-06-11 14:11:59 +03:00
Eduard-Mihai Burtescu
8ee1814062 rustc_codegen_*: deny(unused_lifetimes). 2019-06-11 14:11:58 +03:00
Eduard-Mihai Burtescu
7b353f215f rustc_borrowck: deny(unused_lifetimes). 2019-06-11 14:11:58 +03:00
Eduard-Mihai Burtescu
8dddfde6e3 rustc_traits: deny(unused_lifetimes). 2019-06-11 14:11:58 +03:00
Eduard-Mihai Burtescu
d110d309b6 rustc_mir: deny(unused_lifetimes). 2019-06-11 14:11:58 +03:00
Eduard-Mihai Burtescu
7dc34945e4 rustc_lint: deny(unused_lifetimes). 2019-06-11 14:11:58 +03:00
Eduard-Mihai Burtescu
26a03405a5 rustc_incremental: deny(unused_lifetimes). 2019-06-11 14:11:58 +03:00
Eduard-Mihai Burtescu
774724be3c rustc: deny(unused_lifetimes). 2019-06-11 14:11:58 +03:00
Eduard-Mihai Burtescu
ce0ba38921 syntax_ext: deny(unused_lifetimes). 2019-06-11 14:11:58 +03:00
Eduard-Mihai Burtescu
4d426bb1c0 rustc_target: deny(unused_lifetimes). 2019-06-11 14:11:58 +03:00
bors
8e948df707 Auto merge of #60463 - mjbshaw:transparent, r=varkor,rkruppe
Implement RFC 2645 (transparent enums and unions)

Tracking issue: #60405
2019-06-11 11:06:38 +00:00
bors
912d22e369 Auto merge of #61673 - RalfJung:miri-no-hard-float, r=eddyb,oli-obk
Miri: convert to/from apfloat instead of host floats

Cc @oli-obk @eddyb
2019-06-11 08:15:12 +00:00
bors
9d9c7ad323 Auto merge of #61492 - RalfJung:const-qualif-comments, r=eddyb
Const qualification comments

I extracted some const-qualif knowledge from @eddyb. This is my attempt to turn that into comments.

Cc @oli-obk 	@eddyb
2019-06-11 05:24:41 +00:00
Michael Bradshaw
dac1c6a731 Implement RFC 2645 (transparent enums and unions)
Tracking issue: #60405
2019-06-10 22:07:24 -07:00
bors
efc30d0cda Auto merge of #61052 - jsgf:emit-save-analysis-notifications, r=alexcrichton
Emit save analysis notifications

Addresses issue https://github.com/rust-lang/rust/issues/61047
2019-06-11 02:25:39 +00:00
bors
5e2c11034f Auto merge of #60793 - Xanewok:raw-string-cleanup, r=petrochenkov
lexer: Disallow bare CR in raw byte strings

Handles bare CR ~but doesn't translate `\r\n` to `\n` yet in raw strings yet~ and translates CRLF to LF in raw strings.

As a side-note I think it'd be good to change the `unescape_` to return plain iterators to reduce some boilerplate (e.g. `has_error` could benefit from collecting `Result<T>` and aborting early on errors) but will do that separately, unless I missed something here that prevents it.

@matklad @petrochenkov thoughts?
2019-06-10 23:32:12 +00:00
bors
02564de47b Auto merge of #61694 - Xanewok:update-rls, r=kennytm
Update RLS

This includes https://github.com/rust-lang/rls/pull/1482 which should finally fix the spurious tests RLS in Rust CI (test-pass -> test-fail).

r? @oli-obk
cc @ehuss
2019-06-10 18:24:43 +00:00
Jeremy Fitzhardinge
7a22c34be7 Emit artifact notifications for save-analysis output
Issue: https://github.com/rust-lang/rust/issues/61047
2019-06-10 09:43:58 -07:00
Igor Matuszewski
630d5f355f Don't suggest using \r in raw strings 2019-06-10 17:32:15 +02:00
bors
a73ecb3d9c Auto merge of #61716 - Centril:rollup-nxwf5ol, r=Centril
Rollup of 5 pull requests

Successful merges:

 - #59600 (Replaced linear token counting macros with optimized implementation)
 - #61501 (get rid of real_intrinsics module)
 - #61570 (Fix issues with const argument inference)
 - #61683 (Haiku: the maximum stack size is 16 MB)
 - #61697 (submodules: update clippy from 71be6f62 to c0dbd34b)

Failed merges:

r? @ghost
2019-06-10 11:15:07 +00:00
Mazdak Farrokhzad
f90d34874e
Rollup merge of #61697 - matthiaskrgr:submodule_upd, r=Manishearth
submodules: update clippy from 71be6f62 to c0dbd34b

Changes:
````
travis: disable rls integration test.
rustup https://github.com/rust-lang/rust/pull/61669/
Add OUTER_EXPN_INFO lint
````

Should fix clippy toolstate
2019-06-10 13:14:32 +02:00
Mazdak Farrokhzad
2bb390b281
Rollup merge of #61683 - nielx:haiku-stack-limit, r=nagisa
Haiku: the maximum stack size is 16 MB

This keeps the compiler from crashing every time it is invoked. No functional change on other platforms.

This patch is similar to the limitation that is in the [librustdoc/lib.rs](57e13e0325/src/librustdoc/lib.rs (L89)).
2019-06-10 13:14:31 +02:00
Mazdak Farrokhzad
e181139162
Rollup merge of #61570 - varkor:infer-const-arg, r=eddyb
Fix issues with const argument inference

Fixes https://github.com/rust-lang/rust/issues/60724.
Fixes https://github.com/rust-lang/rust/issues/61346.

r? @eddyb
2019-06-10 13:14:29 +02:00
Mazdak Farrokhzad
22244cfab0
Rollup merge of #61501 - RalfJung:intrinsics, r=rkruppe
get rid of real_intrinsics module

instead import intrinsics locally in their wrapper functions.

(These functions are wrapper functions as a preparation to fixing https://github.com/rust-lang/rust/issues/53871.)
2019-06-10 13:14:28 +02:00
Mazdak Farrokhzad
97df8676b7
Rollup merge of #59600 - tobia:master, r=pnkfelix
Replaced linear token counting macros with optimized implementation

There are currently two distinct token-counting macros in the source. Both implement the trivial algorithm, with linear complexity. They may or may not be adequate for their use case, but considering that other people are probably going to copy and paste them whenever they need a token-counting macro, I replaced them with an optimized implementation with logarithmic complexity.
2019-06-10 13:14:26 +02:00
Ralf Jung
0edf46f7d1 comments 2019-06-10 13:08:13 +02:00
Ralf Jung
b823cc1ece const-correctness might be confusing for C++ people 2019-06-10 13:08:13 +02:00
Ralf Jung
f2b49d978c avoid 'const-context' terminology 2019-06-10 13:08:13 +02:00
Ralf Jung
ed02b156c5 replace some mode comparisons by more readable function call, rename some Mode, and more comments 2019-06-10 13:08:13 +02:00
Ralf Jung
ea21a8a38f some more comments for const_qualif 2019-06-10 13:06:49 +02:00
bors
1cbd8a4d68 Auto merge of #61506 - imbrem:mir_body_renaming, r=eddyb
Changed usages of `mir` in librustc::mir and librustc_mir to `body`

Work on part 2 of #60229
2019-06-10 08:07:22 +00:00
Niels Sascha Reedijk
56a7f1e77e Haiku: the maximum stack size is 16 MB
When one tries to create a thread with a requested stack size larger
than 16 MB, the call will fail and the compiler will bail out. Therefore
we should limit the size of the thread stack to 16 MB on Haiku.
2019-06-10 08:10:06 +02:00
bors
5d4aef6055 Auto merge of #61608 - Aaron1011:feature/weird-expr-yield, r=Centril
Add nested 'yield' expression to weird expressions test
2019-06-10 05:17:12 +00:00
bors
ad3829fd66 Auto merge of #61706 - petrhosek:bootstrap-cp-r, r=Mark-Simulacrum
Use Build::read_dir instead of fs::read_dir in Build::cp_r

Build::read_dir does better error handling when the directory doesn't
exist; it actually prints the name of the directory rather than just
printing the underlying error "No such file or directory" which on
its own isn't very useful.
2019-06-10 02:35:29 +00:00
Petr Hosek
449db68910 Use Build::read_dir instead of fs::read_dir in Build::cp_r
Build::read_dir does better error handling when the directory doesn't
exist; it actually prints the name of the directory rather than just
printing the underlying error "No such file or directory" which on
its own isn't very useful.
2019-06-09 16:57:17 -07:00
bors
61a60ce7d3 Auto merge of #61229 - Centril:stabilize-repr_align_enum, r=nagisa
Stabilize #![feature(repr_align_enum)] in Rust 1.37.0

On an `enum` item, you may now write:

```rust
#[repr(align(X))]
enum Foo {
    // ...
}
```

This has equivalent effects to first defining:

```rust
#[repr(align(X))]
struct AlignX<T>(T);
```

and then using `AlignX<Foo>` in `Foo`'s stead.

r? @nagisa
2019-06-09 23:50:04 +00:00
Jad Ghalayini
80ff07f30d Changed usages of mir in librustc::mir and librustc_mir to body 2019-06-09 16:05:05 -04:00
Matthias Krüger
1d045149f0 submodules: update clippy from 71be6f62 to c0dbd34b
Changes:
````
travis: disable rls integration test.
rustup https://github.com/rust-lang/rust/pull/61669/
Add OUTER_EXPN_INFO lint
````
2019-06-09 21:37:26 +02:00
bors
400b409efc Auto merge of #61691 - RalfJung:miri-slow, r=Centril
Miri: disable a slow test
2019-06-09 17:47:48 +00:00
Igor Matuszewski
eb5aa7583d Update RLS
This includes https://github.com/rust-lang/rls/pull/1482 which should
finally fix the spurious tests in Rust CI (test-pass -> test-fail).
2019-06-09 16:14:52 +02:00
Igor Matuszewski
63dc7da703 Use char byte calculation using existing iterator 2019-06-09 15:44:57 +02:00
Igor Matuszewski
735ac057bb Actually translate CRLF in raw byte strings and unify unescape impl 2019-06-09 15:14:55 +02:00
Igor Matuszewski
3c1d352dc4 Add a doc comment for scan_raw_string 2019-06-09 14:20:29 +02:00
Igor Matuszewski
8cd51fff82 Add test for raw byte CRLF translation 2019-06-09 14:15:31 +02:00
Ralf Jung
60d8675312 Miri: disable a slow test 2019-06-09 14:04:30 +02:00
Ralf Jung
8dfc8db235 forgot about multivariant enum casts 2019-06-09 13:53:44 +02:00