Commit Graph

77532 Commits

Author SHA1 Message Date
Scott McMurray
f0069b8486 Add a ui test for an incorrect Result success type in a #[test] 2018-04-26 21:33:05 -07:00
bors
8a09bc6a77 Auto merge of #48995 - aravind-pg:canonical-query, r=nikomatsakis
Create a canonical trait query for `evaluate_obligation`

This builds on the canonical query machinery introduced in #48411 to introduce a new canonical trait query for `evaluate_obligation` in the trait selector. Also ports most callers of the original `evaluate_obligation` to the new system (except in coherence, which requires support for intercrate mode). Closes #48537.

r? @nikomatsakis
2018-04-27 03:53:39 +00:00
Alex Crichton
3565556d8b Update parking_lot dependencies
This commit updates `parking_lot` to pull in Amanieu/parking_lot#70 and...

Closes #49438
2018-04-26 20:50:06 -07:00
Mark Mansi
c122b3a42c not insta-stable 2018-04-26 22:38:39 -05:00
John Kåre Alsaker
4d52751d12 Rename InternedString to LocalInternedString and introduce a new thread-safe InternedString 2018-04-27 03:35:32 +02:00
bors
e05b78daa6 Auto merge of #49420 - nox:enum-scalarpair, r=eddyb
Use ScalarPair for tagged enums
2018-04-27 01:30:10 +00:00
Aravind Gollakota
e423dcc713 Update a compile-fail test 2018-04-26 20:28:30 -05:00
Aravind Gollakota
d5b2e90744 Retry canonical trait query in standard mode if overflow occurs
This is slightly hacky and hopefully only a somewhat temporary solution.
2018-04-26 20:28:30 -05:00
Aravind Gollakota
5cb0372160 Remove the stored obligation in OverflowError to simplify things
We will shortly refactor things so that it is no longer needed
2018-04-26 20:28:30 -05:00
Aravind Gollakota
e5535fc7dd Introduce trait query mode and use it to set overflow error handling policy in traits::select 2018-04-26 20:28:30 -05:00
Aravind Gollakota
3dd26b8a3e Simplify trait selector's evaluation API slightly 2018-04-26 20:28:30 -05:00
Aravind Gollakota
bc16b8e92a Port existing callers of evaluate_obligation to the new canonical trait query
Except the one in coherence, which needs support for intercrate mode.
2018-04-26 20:28:30 -05:00
Aravind Gollakota
3ab3a9f509 Create a canonical trait query for evaluate_obligation 2018-04-26 20:28:29 -05:00
Aravind Gollakota
79f71f976a Refactor overflow handling in traits::select to propagate overflow instead of aborting eagerly
We store the obligation that caused the overflow as part of the OverflowError, and report it at the public API endpoints (rather than in the implementation internals).
2018-04-26 20:26:20 -05:00
Alex Crichton
20ad427af0 rustc: Emit uwtable for allocator shims
This commit emits the `uwtable` attribute to LLVM for platforms that require it
for the allocator shims that we generate to ensure that they can hopefully get
unwound past. This is a stab in the dark at helping
https://bugzilla.mozilla.org/show_bug.cgi?id=1456150 along.
2018-04-26 17:09:08 -07:00
bors
7d8f0e22f5 Auto merge of #50253 - nikomatsakis:regressions-2018-04-26, r=eddyb
drop elaboration should reveal all

This used to happen implicitly through the normalization function; but we now keep the param-env as is, which seems less surprising.

cc #49685

r? @eddyb
2018-04-26 23:11:39 +00:00
bobtwinkles
73e0c1e968 Fix review nits 2018-04-26 18:28:34 -04:00
Vadim Petrochenkov
c1492fe303 Add one more prelude layer for extern crate names passed with --extern 2018-04-27 00:46:55 +03:00
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