- 10 12月, 2017 1 次提交
-
-
由 Guillaume Gomez 提交于
-
- 09 12月, 2017 7 次提交
-
-
由 bors 提交于
Add Drop impl for linked_list::DrainFilter This is part of #43244. See https://github.com/rust-lang/rust/issues/43244#issuecomment-349894355
-
由 Thayne McCombs 提交于
This reverts commit 00acdbd5.
-
由 bors 提交于
Fixes doc important trait display on mobile Fixes #46527. r? @QuietMisdreavus
-
由 bors 提交于
macros: add test for #44128 Closes #44128. r? @nrc
-
由 bors 提交于
Add read, read_string, and write functions to std::fs New APIs in `std::fs`: ```rust pub fn read<P: AsRef<Path>>(path: P) -> io::Result<Vec<u8>> { … } pub fn read_string<P: AsRef<Path>>(path: P) -> io::Result<String> { … } pub fn write<P: AsRef<Path>, C: AsRef<[u8]>>(path: P, contents: C) -> io::Result<()> { ... } ``` (`read_string` is based on `read_to_string` and so returns an error on non-UTF-8 content.) Before: ```rust use std::fs::File; use std::io::Read; let mut bytes = Vec::new(); File::open(filename)?.read_to_end(&mut bytes)?; do_something_with(bytes) ``` After: ```rust use std::fs; do_something_with(fs::read(filename)?) ```
-
由 Simon Sapin 提交于
-
- 08 12月, 2017 26 次提交
-
-
由 Guillaume Gomez 提交于
-
由 bors 提交于
Md warnings Fixes #45365. r? @QuietMisdreavus
-
由 bors 提交于
incr.comp.: Enable query result caching for many more queries Newly cached queries are: * const_is_rvalue_promotable_to_static * trans_fulfill_obligation * optimized_mir * unsafety_check_result * borrowck * mir_borrowck * mir_const_qualif * contains_extern_indicator * def_symbol_name * symbol_name This also includes the stricter `Span` hashing first mentioned in #46490, which will lead to more false positives in release builds but overall is more correct -- and necessary for caching MIR. Hopefully we will soon be able to reduce the rate of false positives again by factoring `Span` out of MIR. r? @nikomatsakis
-
由 Michael Woerister 提交于
-
由 Michael Woerister 提交于
-
由 Michael Woerister 提交于
These were already broken for debug builds.
-
由 Michael Woerister 提交于
-
由 Michael Woerister 提交于
-
由 bors 提交于
rustc: Further tweak linkage in ThinLTO In #46382 the logic around linkage preservation with ThinLTO ws tweaked but the loop that registered all otherwise exported GUID values as "don't internalize me please" was erroneously too conservative and only asking "external" linkage items to not be internalized. Instead we actually want the inversion of that condition, everything *without* "local" linkage to be internalized. This commit updates the condition there, adds a test, and... Closes #46543
-
由 Thayne McCombs 提交于
-
由 Thayne McCombs 提交于
-
由 bors 提交于
Rollup of 5 pull requests - Successful merges: #46416, #46444, #46526, #46539, #46548 - Failed merges:
-
由 Guillaume Gomez 提交于
Recommends lazily evaluated alternatives for `Option::or` and `Result::or` Adds language to docs for `Option` and `Result` recommending the use of lazily evaluated alternatives when appropriate. These comments are intended to echo a [clippy lint] on the same topic. The [reddit discussion] may also be of interest. [clippy lint]: https://rust-lang-nursery.github.io/rust-clippy/master/index.html#or_fun_call [reddit discussion]: https://www.reddit.com/r/rust/comments/7hutqn/perils_of_optionor_and_resultor/
-
由 Guillaume Gomez 提交于
Do not automatically merge `Cargo.lock` It essentially never does what it's supposed to and often leaves the `Cargo.lock` in a state where it needs manual adjustments or resetting to master/yourbranch. With this setting git will always choose your `Cargo.lock` over the one from master and report a merge error (if both master and your branch touched `Cargo.lock`). Now you can run `./x.py help` and it should normally update the `Cargo.lock` to be one that has everything needed by master and your branch.
-
由 Guillaume Gomez 提交于
Greatly improve sidebar when width < 700px Fixes #36531. r? @QuietMisdreavus A few screenshots: <img width="1440" alt="screen shot 2017-12-06 at 00 41 36" src="https://user-images.githubusercontent.com/3050060/33636875-6ad8b1a6-da1e-11e7-8d5b-d6d530ea5258.png"> <img width="1440" alt="screen shot 2017-12-06 at 00 41 40" src="https://user-images.githubusercontent.com/3050060/33636876-6af58196-da1e-11e7-82ab-b82768958037.png">
-
由 Guillaume Gomez 提交于
Move colors to main.css r? @QuietMisdreavus
-
由 Guillaume Gomez 提交于
doc: macro `cfg!` evaluating at compile-time
-
由 Guillaume Gomez 提交于
-
由 Guillaume Gomez 提交于
-
由 Jeffrey Seyfried 提交于
-
由 Guillaume Gomez 提交于
-
由 Guillaume Gomez 提交于
-
由 bors 提交于
Modify message for keyword as identifier name This is a temporary solution to #46311. The message is generic enough to cover both cases and is probably a fine enough solution to the specific problem described in the task. However, the underlying reason for this to be wrong is that `next_token_inner` returns `Lifetime` even if the token is a label. That's not simple, as the syntax for both can be quite similar and it may need to take a look to the next token to make a decision. I'm not sure I have enough knowledge about the project to be able to solve that (yet!), so I thought I'll fix the immediate problem first.
-
由 bors 提交于
Allow feature-gate tests to live in ui/ and migrate most of the tests from compile-fail The PR consists of three commits: 1. change tidy to allow feature-gate tests to live in ui/ 2. migrate some feature gate tests to ui/ with renaming only 3. migrate some feature gate tests to ui/ with also removing `// gate-test-...` lines and renaming them to the standard `feature-gate-<feat-name>.rs` format.
-
由 Jonathan Strong 提交于
-
由 Michael Woerister 提交于
-
- 07 12月, 2017 6 次提交
-
-
由 bors 提交于
closure handling for NLL This branch overhauls how we handle closures and universally quantified regions in the NLL code. The goal is to lay the groundwork for "region erasure" by the HIR-based type checker, as well as to avoid "crazy hacks" when it comes to closures. This means that when we type-check a closure, we cannot make use of *any* of the precise values of free regions in its signature, since those are inferred by the HIR type-checker. Therefore, the new code handles closures by: - Creating fresh regions for every free region that appears in the closure's type, which now includes both its signature and the types of all upvars. - This means that the closure is type-checked without knowing about the connections. - When we encounter some region relationship that we can't locally verify, we propagate it to the closure's creator. - During MIR typeck, the closure creators then validates those relationships. For a good example and explanation, see e.g. the test `src/test/nll/closure-requirements/propagate-despite-same-free-region.rs`. Upcoming changes in the next NLL PR (not included in this PR in order to keep it manageable): - Improvements to the MIR type checker so that it handles a lot of stuff presently overlooked - Refactor how we store region values to make it more efficient, better encapsulated - Propagate "type-outlives" relationships like `T: 'a` in a similar fashion to the one covered in this PR (still in the works, but close) - Improvements to error reporting (still in the works) r? @arielb1 or @pnkfelix
-
由 Alex Crichton 提交于
In #46382 the logic around linkage preservation with ThinLTO ws tweaked but the loop that registered all otherwise exported GUID values as "don't internalize me please" was erroneously too conservative and only asking "external" linkage items to not be internalized. Instead we actually want the inversion of that condition, everything *without* "local" linkage to be internalized. This commit updates the condition there, adds a test, and... Closes #46543
-
由 bors 提交于
Update fingerprint tests macros Part of #44924 r? @michaelwoerister
-
由 Niko Matsakis 提交于
per pnkfelix's suggestion
-
由 Niko Matsakis 提交于
suggested by arielb1
-
由 Niko Matsakis 提交于
-