Commit Graph

80455 Commits

Author SHA1 Message Date
Mark Rousskov
7c0dd79e02
Rollup merge of #51868 - Lireer:master, r=pietroalbini
Remove process::id from 'Stabilized APIs' in 1.27.0 release notes

process::id was already stabilized in 1.26.0 and is marked as such in the docs.
2018-06-28 16:07:15 -06:00
Mark Rousskov
7b8fc87733
Rollup merge of #51839 - oli-obk:const_shift_overflow, r=nikomatsakis
Detect overflows of non u32 shifts
2018-06-28 16:07:14 -06:00
Mark Rousskov
e0179dfdce
Rollup merge of #51822 - estebank:suggest-more, r=nikomatsakis
Provide existing ref suggestions for more E0308 errors
2018-06-28 16:07:13 -06:00
Mark Rousskov
85804f66be
Rollup merge of #51765 - jonas-schievink:patch-1, r=KodrAus
Use assert_eq! in copy_from_slice

This will print both lengths when the assertion fails instead of just saying that they're different.

Output of current stable and nightly (modulo the exact line number):
```
thread 'main' panicked at 'destination and source slices have different lengths', libcore/slice/mod.rs:1645:9
```

Output after this PR:
```
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `123`,
 right: `456`: destination and source slices have different lengths', libcore/slice/mod.rs:1645:9
```

Note that I have not run the tests locally.
2018-06-28 16:07:12 -06:00
Mark Rousskov
57aceeecc0
Rollup merge of #51636 - oli-obk:const_diagnostics, r=eddyb
Refactor error reporting of constants

cc @eddyb

This PR should not change any behaviour. It solely simplifies the internal handling of the errors
2018-06-28 16:07:10 -06:00
Esteban Küber
23d59d00be Suggest correct comparison against negative literal
When parsing as emplacement syntax (`x<-1`), suggest the correct syntax
for comparison against a negative value (`x< -1`).
2018-06-28 14:58:54 -07:00
moxian
be7f619870 Change traits to bare FnMut where possible. 2018-06-28 21:57:08 +00:00
moxian
9d426ac387 Make msvc symbol extraction/printing functions generic. 2018-06-28 21:57:03 +00:00
moxian
a0b15012a1 Make stackwalking generic instead of matching on enum variants. 2018-06-28 21:56:58 +00:00
moxian
c0b280f5f5 Load backtrace-related functions only once
.. and pass them around in BacktraceContext.
2018-06-28 21:56:53 +00:00
moxian
3245a475ab Split separate stackwalk variants into their own functions
.. rather than having them be one giant match statement.
2018-06-28 21:56:48 +00:00
moxian
d39c66bf4f Add a fallback for stacktrace printing for older Windows versions.
PR #47252 switched stack inspection functions of dbghelp.dll
to their newer alternatives that also capture inlined context.
Unfortunately, said new alternatives are not present in older
dbghelp.dll versions.
In particular Windows 7 at the time of writing has dbghelp.dll
version 6.1.7601 from 2010, that lacks StackWalkEx and friends.

Fixes #50138
2018-06-28 21:56:42 +00:00
varkor
4071adfcb5 Always check type_dependent_defs 2018-06-28 22:52:44 +01:00
Esteban Küber
8449c5ab8a Fix rebase 2018-06-28 12:52:58 -07:00
Sean McArthur
24ce259782 Arc: remove unused allocation from Weak::new() 2018-06-28 11:49:47 -07:00
Esteban Küber
54a04b3b03 Provide existing ref suggestions for more E0308 errors 2018-06-28 11:37:15 -07:00
Esteban Küber
9a9b747371 review comments: unify duplicated code 2018-06-28 11:12:45 -07:00
Esteban Küber
03bcebbc60 Also point to free named region on lifetime errors 2018-06-28 11:12:44 -07:00
Esteban Küber
3005162f98 Extend support to get_generics for all NodeItems 2018-06-28 11:12:43 -07:00
Esteban Küber
5436a5c55a Point to lifetime in fn definition on lifetime error note 2018-06-28 11:12:42 -07:00
Esteban Küber
cd8ca26257 Point at lifetimes instead of def span for E0195 2018-06-28 11:12:41 -07:00
bors
e3bf634e06 Auto merge of #51687 - japaric:gh51671, r=alexcrichton
translate / export weak lang items

see #51671 for details

fixes #51671
fixes #51342

r? @michaelwoerister or @alexcrichton
2018-06-28 15:34:17 +00:00
Eh2406
6e0cefe3db add comments 2018-06-28 10:18:35 -04:00
Eh2406
ad71cbfe66 use deref instead of inner 2018-06-28 10:18:33 -04:00
Eh2406
4b44db126e each_affected_by_dirty 2018-06-28 10:18:32 -04:00
Eh2406
9bd2a63f29 remove inner_mut as it can mess up invariants 2018-06-28 10:18:31 -04:00
Eh2406
497a3b4fd5 fix typo and tidy 2018-06-28 10:18:30 -04:00
Eh2406
e2c0378a63 move related types into the new module 2018-06-28 10:18:29 -04:00
Eh2406
e4f03682df use the type system to ensure we dedup from the start 2018-06-28 10:18:25 -04:00
Eh2406
0119669711 use retain to avoid the allocation 2018-06-28 10:15:37 -04:00
Eh2406
8a356011ae Remove duplicates 2018-06-28 10:15:37 -04:00
bors
5d95db34a4 Auto merge of #51630 - joshlf:map-split-perf, r=dtolnay
Optimize RefCell refcount tracking

Address the performance concern raised in https://github.com/rust-lang/rust/pull/51466#issuecomment-398255276

cc @dtolnay  @nnethercote @rust-lang/wg-compiler-performance

cc @RalfJung @jhjourdan for soundness concerns

Can somebody kick off a perf run on this? I'm not sure how that's done, but I understand it has to be started manually.

The idea of this change is to switch to representing mutable refcount as values below 0 to eliminate some branching that was required with the old algorithm.
2018-06-28 13:23:07 +00:00
Jan-Erik Rediger
8983ff5226 Explicitely disable WASM code generation for Emscripten
Emscripten changed the default behavior recently:
bd050e64bb/ChangeLog.markdown (v1381-05172018)

It now defaults to WebAssembly and requires an explicit flag to generate asm.js.
WASM=0 is also valid for older emcc and thus doesn't break it.

Closes #51856
2018-06-28 15:02:38 +02:00
Niko Matsakis
cb34989332 add explanatory comment 2018-06-28 08:34:04 -04:00
bors
9f79d2f86a Auto merge of #50997 - michaelwoerister:pre-analyze-filemaps, r=Mark-Simulacrum
Make FileMap::{lines, multibyte_chars, non_narrow_chars} non-mutable.

This PR removes most of the interior mutability from `FileMap`, which should be beneficial, especially in a multithreaded setting. This is achieved by initializing the state in question when the filemap is constructed instead of during lexing. Hopefully this doesn't degrade performance.

cc @wesleywiser
2018-06-28 11:20:41 +00:00
Lireer
fc8f852ebe
Remove process::id from 'Stabilized APIs' in 1.27 2018-06-28 11:30:53 +02:00
Oliver Schneider
2a55d2fc45 Rebase fallout 2018-06-28 11:19:45 +02:00
bors
d84ad59710 Auto merge of #51492 - petrochenkov:hirident, r=eddyb
Use `Ident`s in HIR and remove emulation of hygiene with gensyms

continuation of https://github.com/rust-lang/rust/pull/51072, part of https://github.com/rust-lang/rust/issues/49300

Not all `Name`s in HIR are replaced with `Ident`s, only those needed for hygiene or already having attached spans.
2018-06-28 09:16:10 +00:00
Oliver Schneider
4d473300a2 Turn the use of erroneous constants into errors again 2018-06-28 11:04:26 +02:00
Oliver Schneider
4eea1a4e5e Don't const propagate the body of constants 2018-06-28 11:04:25 +02:00
Oliver Schneider
4bb9648b27 Merge ConstVal and ConstValue 2018-06-28 11:04:25 +02:00
Oliver Schneider
221a499bf1 Fixup 2018-06-28 11:02:31 +02:00
Oliver Schneider
05994779ea Move everything over from middle::const_val to mir::interpret 2018-06-28 11:02:31 +02:00
Oliver Schneider
6005b0ad2f Move the Lrc outside the error type and name the fields 2018-06-28 11:01:35 +02:00
Oliver Schneider
6e5951c734 Remove unused type 2018-06-28 11:01:35 +02:00
Oliver Schneider
57e190c850 Address review comments 2018-06-28 11:01:35 +02:00
Oliver Schneider
6f8fe4eaef Eliminate old CTFE's ErrKind 2018-06-28 11:01:35 +02:00
Oliver Schneider
58fdac638e Simplify const error reporting 2018-06-28 11:01:35 +02:00
Michael Woerister
a1f8a6ce80 Fix FileMap::line_begin_pos().
The method relied on the FileMap still being under construction in
order for it to do what the name promises. It's now independent of
the current state.
2018-06-28 10:46:04 +02:00
Vadim Petrochenkov
d7072b5bb4 Fix rebase 2018-06-28 11:04:51 +03:00