- 29 6月, 2018 10 次提交
-
-
由 bors 提交于
Fix macro missing from doc search Fixes #51095. r? @QuietMisdreavus
-
由 bors 提交于
Rollup of 6 pull requests Successful merges: - #51636 (Refactor error reporting of constants) - #51765 (Use assert_eq! in copy_from_slice) - #51822 (Provide existing ref suggestions for more E0308 errors) - #51839 (Detect overflows of non u32 shifts) - #51868 (Remove process::id from 'Stabilized APIs' in 1.27.0 release notes) - #51875 (Explicitely disable WASM code generation for Emscripten) Failed merges: r? @ghost
-
由 Mark Rousskov 提交于
Explicitely disable WASM code generation for Emscripten Emscripten changed the default behavior recently: https://github.com/kripken/emscripten/blob/bd050e64bb0d9952df1344b8ea9356252328ad83/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.
-
由 Mark Rousskov 提交于
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.
-
由 Mark Rousskov 提交于
Detect overflows of non u32 shifts
-
由 Mark Rousskov 提交于
Provide existing ref suggestions for more E0308 errors
-
由 Mark Rousskov 提交于
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.
-
由 Mark Rousskov 提交于
Refactor error reporting of constants cc @EddyB This PR should not change any behaviour. It solely simplifies the internal handling of the errors
-
由 Esteban Küber 提交于
- 28 6月, 2018 30 次提交
-
-
由 bors 提交于
translate / export weak lang items see #51671 for details fixes #51671 fixes #51342 r? @michaelwoerister or @alexcrichton
-
由 bors 提交于
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.
-
由 Jan-Erik Rediger 提交于
Emscripten changed the default behavior recently: https://github.com/kripken/emscripten/blob/bd050e64bb0d9952df1344b8ea9356252328ad83/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
-
由 bors 提交于
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
-
由 Lireer 提交于
-
由 Oliver Schneider 提交于
-
由 bors 提交于
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.
-
由 Oliver Schneider 提交于
-
由 Oliver Schneider 提交于
-
由 Oliver Schneider 提交于
-
由 Oliver Schneider 提交于
-
由 Oliver Schneider 提交于
-
由 Oliver Schneider 提交于
-
由 Oliver Schneider 提交于
-
由 Oliver Schneider 提交于
-
由 Oliver Schneider 提交于
-
由 Oliver Schneider 提交于
-
由 Michael Woerister 提交于
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.
-
由 Vadim Petrochenkov 提交于
-
由 Vadim Petrochenkov 提交于
-
由 Vadim Petrochenkov 提交于
-
由 Vadim Petrochenkov 提交于
Remove emulation of hygiene with gensyms
-
由 Vadim Petrochenkov 提交于
Namely: labels, type parameters, bindings in patterns, parameter names in functions without body. All of these do not need hygiene after lowering to HIR, only span locations.
-
由 Vadim Petrochenkov 提交于
-
由 Vadim Petrochenkov 提交于
-
由 Vadim Petrochenkov 提交于
-
由 bors 提交于
Suggestion for 'static impl Trait return When encountering a named or anonymous sup requirement (for example, `&'a self`) and a `'static` impl Trait return type, suggest adding the `'_` lifetime constraing to the return type. Fix #43719, #51282. ``` error: cannot infer an appropriate lifetime --> $DIR/static-return-lifetime-infered.rs:17:16 | LL | fn iter_values_anon(&self) -> impl Iterator<Item=u32> { | ----------------------- this return type evaluates to the `'static` lifetime... LL | self.x.iter().map(|a| a.0) | ------ ^^^^ | | | ...but this borrow... | note: ...can't outlive the anonymous lifetime #1 defined on the method body at 16:5 --> $DIR/static-return-lifetime-infered.rs:16:5 | LL | / fn iter_values_anon(&self) -> impl Iterator<Item=u32> { LL | | self.x.iter().map(|a| a.0) LL | | } | |_____^ help: you can add a constraint to the return type to make it last less than `'static` and match the anonymous lifetime #1 defined on the method body at 16:5 | LL | fn iter_values_anon(&self) -> impl Iterator<Item=u32> + '_ { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ```
-
由 bors 提交于
convert NLL ops to caches This is a extension of <https://github.com/rust-lang/rust/pull/51460>. It uses a lot more caching than we used to do. This caching is not yet as efficient as it could be, but I'm curious to see the current perf results. This is the high-level idea: in the MIR type checker, use [canonicalized queries](https://rust-lang-nursery.github.io/rustc-guide/traits/canonical-queries.html) for all the major operations. This is helpful because the MIR type check is operating in a context where all types are fully known (mostly, anyway) but regions are completely renumbered. This means we often wind up with duplicate queries like `Foo<'1, '2> :Bar` and `Foo<'3, '4>: Bar`. Canonicalized queries let us re-use the results. By the final commit in this PR, we can essentially just "read off" the resulting region relations and add them to the NLL type check.
-
由 bors 提交于
Rollup of 7 pull requests Successful merges: - #49987 (Add str::split_ascii_whitespace.) - #50342 (Document round-off error in `.mod_euc()`-method, see issue #50179) - #51658 (Only do sanity check with debug assertions on) - #51799 (Lower case some feature gate error messages) - #51800 (Add a compiletest header for edition) - #51824 (Fix the error reference for LocalKey::try_with) - #51842 (Document that Layout::from_size_align does not allow align=0) Failed merges: r? @ghost
-
由 kennytm 提交于
Document that Layout::from_size_align does not allow align=0 This was already implied since zero is not a power of two, but maybe worth pointing out.
-