Esteban Küber
d92d1935cb
Don't ICE on tuple struct ctor with incorrect arg count
2018-04-26 14:19:21 -07:00
Anthony Ramine
90656441a9
Emit range metadata on calls returning scalars ( fixes #50157 )
2018-04-26 22:02:23 +02:00
bors
7f3444e1ba
Auto merge of #49513 - nox:univariant-fieldless-enum-as-zst, r=eddyb
...
Treat repr(Rust) univariant fieldless enums as ZSTs
This makes all those enums be represented the same way:
```rust
enum A1 { B1 }
enum A2 { B2 = 0 }
enum A3 { B3, C3(!) }
```
Related to #15747 .
Cc @rust-lang/wg-codegen @rust-lang/lang
2018-04-26 18:26:03 +00:00
Guillaume Gomez
acf0adf798
Add setting to go to item if there is only one result
2018-04-26 19:53:21 +02:00
Mark Mansi
20ef0e001a
make Vec::new const :P
2018-04-26 12:46:28 -05:00
Niko Matsakis
86e9a7ac43
add regression test
...
Fixes #49685
2018-04-26 13:42:22 -04:00
Niko Matsakis
0361e5938c
use reveal_all
during drop elaboration
...
This used to happen by default as part of the normalization routine
that was being used.
2018-04-26 13:31:52 -04:00
Niko Matsakis
2a58875fa2
improved debug output
2018-04-26 13:31:24 -04:00
bors
949010d23e
Auto merge of #50228 - irinagpopa:backstory-v2, r=nikomatsakis
...
Rename rustc_back to rustc_target and move ABI code to it.
Fixes #45226 .
2018-04-26 16:00:48 +00:00
Irina Popa
a131c518ad
Fixed tidy errors.
2018-04-26 17:49:24 +03:00
Irina Popa
04fa0e7bb3
rustc_target: move in syntax::abi and flip dependency.
2018-04-26 17:49:16 +03:00
Anthony Ramine
1c09977c9a
Mark SingleVariant as repr(u8) in c-style-enum
...
I should rather properly fix debuginfo but I have no clue how to do that.
2018-04-26 16:22:18 +02:00
Anthony Ramine
8f36804c00
Treat repr(Rust) univariant fieldless enums as a ZST ( fixes #15747 )
...
This makes all those enums be represented the same way:
```rust
enum A1 { B1 }
enum A2 { B2 = 0 }
enum A3 { B3, C3(!) }
```
2018-04-26 16:22:18 +02:00
Alex Crichton
a2a9cc68fe
rustc: Disable threads in LLD for wasm
...
Upstream bug reports (rustwasm/wasm-bindgen#119 ) show that this may be the
culprit of odd crashes/hangs. The linker is a tiny fraction of build time anyway
right now so let's disable it and figure out how to possibly reenable it later
if necessary.
2018-04-26 06:56:37 -07:00
Irina Popa
030244cd4a
rustc_target: move in cabi_* from rustc_trans.
2018-04-26 16:50:31 +03:00
Irina Popa
fb15d44700
rustc_trans: generalize cabi_* to any context type.
2018-04-26 16:50:31 +03:00
Irina Popa
c45dda92fe
rustc_target: move for_variant and field TyLayout methods to a trait.
2018-04-26 16:50:29 +03:00
Irina Popa
7a5147616b
rustc_target: move LayoutOf's type parameter to an associated type.
2018-04-26 16:50:28 +03:00
Irina Popa
3bd7efadae
rustc_target: move in type definitions from rustc_trans::abi.
2018-04-26 16:50:27 +03:00
Irina Popa
bdcd08278a
rustc_target: move in type definitions from ty::layout.
2018-04-26 16:50:20 +03:00
Irina Popa
38e964077b
Rename rustc_back::target to rustc_target::spec.
2018-04-26 16:39:44 +03:00
Irina Popa
6f03b80020
rustc_back: move LinkerFlavor, PanicStrategy, and RelroLevel to target.
2018-04-26 16:39:27 +03:00
Anthony Ramine
7bfe3ae00a
Add a test for casts of univariant C-like enums
2018-04-26 15:07:04 +02:00
Oliver Schneider
2807f4f773
Properly evaluate zst enum
2018-04-26 15:07:04 +02:00
Anthony Ramine
1839ec5ef8
Consistently use C_uint_big for discriminants
2018-04-26 15:07:04 +02:00
Anthony Ramine
b7c8cc4b77
Properly look for uninhabitedness when handling discriminants
2018-04-26 15:07:04 +02:00
Shotaro Yamada
98c2e0976d
Do not ICE on generics mismatch with non-local traits
...
Fixes #49841
2018-04-26 21:56:21 +09:00
bors
88cd36714c
Auto merge of #50245 - GuillaumeGomez:rollup, r=GuillaumeGomez
...
Rollup of 4 pull requests
Successful merges:
- #50177 (mark std::str::replace(,n) as #[must_use])
- #50207 (Hash EntryKind::AssociatedConst const data)
- #50214 (Js improvements)
- #50219 (Added missing `.` in docs.)
Failed merges:
- #50229 (Add setting to go to item if there is only one result)
2018-04-26 11:07:14 +00:00
Guillaume Gomez
30e3f1a620
Add more doc aliases
2018-04-26 12:56:10 +02:00
Nicholas Nethercote
2e4f66a86f
Make dump_{alloc,allocs,local}() no-ops when tracing is disabled.
...
Because they traverse data structures and build up strings, which is
wasted effort if those strings aren't printed.
The patch also removes some now-unnecessary log_enabled! tests at call
sites.
2018-04-26 19:22:35 +10:00
bors
3eca70a0c5
Auto merge of #50072 - oli-obk:discriminants, r=eddyb
...
Allow variant discriminant initializers to refer to other initializer…
…s of the same enum
r? @eddyb
fixes the 2.4 failure of https://github.com/rust-lang/rust/issues/49765
cc @durka @retep998
2018-04-26 08:51:39 +00:00
Guillaume Gomez
438f3ca01c
Rollup merge of #50219 - ralfbiedert:master, r=frewsxcv
...
Added missing `.` in docs.
2018-04-26 10:11:16 +02:00
Guillaume Gomez
8f6b42711f
Rollup merge of #50214 - GuillaumeGomez:JS-improvements, r=QuietMisdreavus
...
Js improvements
r? @QuietMisdreavus
2018-04-26 10:11:15 +02:00
Guillaume Gomez
0d758ecc61
Rollup merge of #50207 - wesleywiser:hash_const_data, r=eddyb
...
Hash EntryKind::AssociatedConst const data
Related to #49991
r? @michaelwoerister
cc @eddyb
2018-04-26 10:11:14 +02:00
Guillaume Gomez
3b49b27e0c
Rollup merge of #50177 - matthiaskrgr:std_std_replacen__must_use, r=oli-obk
...
mark std::str::replace(,n) as #[must_use]
let x = "a b c c";
x.replacen("c", "d", 2");
might not do what people might think it does.
2018-04-26 10:11:11 +02:00
Anthony Ramine
3ca6ad922e
Use ScalarPair for tagged enums
2018-04-26 09:30:28 +02:00
Oliver Schneider
195c9f47e9
Allow variant discriminant initializers to refer to other initializers of the same enum
2018-04-26 08:54:14 +02:00
bors
1515cded74
Auto merge of #49732 - Zoxc:sync-dep-graph, r=michaelwoerister
...
Make incremental compilation thread-safe
r? @michaelwoerister
2018-04-26 06:38:14 +00:00
bors
c18778704c
Auto merge of #50236 - nrc:update, r=alexcrichton
...
Update rustfmt and rls
r? @alexcrichton
2018-04-26 03:36:22 +00:00
Nick Cameron
612830dc77
handle license check
2018-04-26 15:10:11 +12:00
Nicholas Nethercote
259ae18139
Implement LazyBTreeMap and use it in a few places.
...
This is a thin wrapper around BTreeMap that avoids allocating upon
creation. It speeds up some rustc-perf benchmarks by up to 3.6%.
2018-04-26 11:55:06 +10:00
bors
84ce67ef95
Auto merge of #50131 - Manishearth:crate-in-local, r=petrochenkov
...
Allow crate:: in local paths
Currently if you want to use `crate` locally you have to do `::crate::`. This shouldn't be necessary
(will fix up tests later)
r? @petrochenkov
2018-04-25 23:25:47 +00:00
Nick Cameron
127f9a6416
Update rustfmt and rls
2018-04-26 10:11:28 +12:00
Manish Goregaokar
4e2cd4104a
Approximate -> Applicability
2018-04-25 14:55:25 -07:00
Mark Mansi
a2105b8e21
make RawVec::empty const
2018-04-25 16:42:57 -05:00
Mark Mansi
256096da9e
Make Vec::new const
2018-04-25 16:33:02 -05:00
bors
6eb4f1d036
Auto merge of #50016 - tmandry:cleanup-binder, r=nikomatsakis
...
Make Binder's field private and clean up its usage
AKA "tour de rustc"
Closes #49814 .
2018-04-25 20:58:53 +00:00
Kornel
1912f39e7c
Update book submodule to pass linkchecker test
2018-04-25 21:56:06 +01:00
Kornel
f6a833a99a
Suggest alternatives to Error::description()
2018-04-25 21:54:33 +01:00
Simon Sapin
a5655b81a3
Move description of the Error trait to its own doc-comment
...
… rather than the module’s.
Remove code definition of the Error trait from its doc-comment
It was out of date, and rustdoc already shows the same information.
Add a default impl for Error::description and document it as deprecated.
It is redundant with Display while being much less flexible for implementors.
This is only a "soft" deprecation: it is not worth the hassle of a warning to existing users.
Tweak Error trait docs to reflect actual requirements
2018-04-25 21:54:33 +01:00