- 03 1月, 2020 2 次提交
-
-
由 Yuki Okushi 提交于
Suggest adding a lifetime constraint for opaque type Fixes #67577, where code like this: ``` struct List { data: Vec<String>, } impl List { fn started_with<'a>(&'a self, prefix: &'a str) -> impl Iterator<Item=&'a str> { self.data.iter().filter(|s| s.starts_with(prefix)).map(|s| s.as_ref()) } } ``` will show this error: ``` Compiling playground v0.0.1 (/playground) error[E0597]: `prefix` does not live long enough --> src/lib.rs:6:47 | 5 | fn started_with<'a>(&'a self, prefix: &'a str) -> impl Iterator<Item=&'a str> { | -- lifetime `'a` defined here --------------------------- opaque type requires that `prefix` is borrowed for `'a` ... ``` but without suggesting the lovely `help: you can add a constraint..`. r? @estebank
-
由 Yuki Okushi 提交于
Allow for setting a ThinLTO import limit during bootstrap The benchmarks in https://github.com/rust-lang/rust/pull/66625 have shown that a lower ThinLTO import limit can be a net win for bootstrap times. This PR: - exposes the setting to `config.toml`, - defaults to a lower limit if `incremental = true` in `config.toml`, and - sets a lower limit for `x86_64-gnu-llvm-7` CI image in order to make the jobs complete more quickly (which remains to be tested). This setting will affect how the compiler and it's tools are compiled. It will not affect the settings the compiler uses when compiling user code. r? @pietroalbini cc @rust-lang/infra
-
- 02 1月, 2020 11 次提交
-
-
由 Michael Woerister 提交于
-
由 Michael Woerister 提交于
-
由 bors 提交于
Add Iterator::try_find I found a need for this fn, and created this PR. Tracking issue: #63178 I did a fair amount of thinking about the function name, and settled on the current one. I don't see other anything else that's non-trivial here, but I'm open for debate. I just want this functionality to be there. It couples with the `collect` trick for collecting `Result<Vec<T>, E>` from `Iterator<Item = Result<T, E>>`. UPD: I've already looked at `fallible_iterator` crate, but I don't think it supports my use case. The main problem is that I can't construct a failable iterator. I have a regular iterator, and I just need to apply a predicate that can fail via `find` method. UPD: `fallible_iterator` would work, but it's not elegant cause I'd have to make a failable iterator by mapping iterator with `Result::Ok` first.
-
由 bors 提交于
Update the barrier cache during ARM EHABI unwinding Fixes #67242 r? @alexcrichton
-
由 bors 提交于
Move stability queries to librustc_passes. Contains: - check_mod_unstable_api_usage query; - stability_index query; - check_unused_or_stable features pass. Split out of #67688 r? @Zoxc
-
由 bors 提交于
Update rustc-guide r? @ehuss cc @rust-lang/wg-learning
-
由 MOZGIII 提交于
-
由 bors 提交于
Lint overflowing integer casts in const prop This extends the invalid cases we catch in const prop to include overflowing integer casts using the same machinery as the overflowing binary and unary operation logic. r? @oli-obk
-
由 Wesley Wiser 提交于
-
由 Mark Mansi 提交于
-
由 Amanieu d'Antras 提交于
-
- 01 1月, 2020 20 次提交
-
-
由 bors 提交于
Bump smallvec
-
由 Camille GILLOT 提交于
Contains: - check_mod_unstable_api_usage query; - stability_index query; - check_unused_or_stable features pass.
-
由 Camille GILLOT 提交于
-
由 bors 提交于
Revert parts of #66405. Because PR #66405 caused major performance regressions in some cases. That PR had five commits, two of which affected performance, and three of which were refactorings. This change undoes the performance-affecting changes, while keeping the refactorings in place. Fixes #67454. r? @nikomatsakis
-
由 bors 提交于
Rename `syntax_pos` to `rustc_span` in source code Follow-up to https://github.com/rust-lang/rust/pull/67707. r? @Centril
-
由 Vadim Petrochenkov 提交于
-
由 Nicholas Nethercote 提交于
Because it caused major performance regressions in some cases. That PR had five commits, two of which affected performance, and three of which were refactorings. This change undoes the performance-affecting changes, while keeping the refactorings in place. Fixes #67454.
-
由 bors 提交于
Update Clippy Fixes #67716 r? @oli-obk
-
由 bors 提交于
Rollup of 6 pull requests Successful merges: - #67574 (Extract `rustc_ast_lowering` crate from `rustc`) - #67685 (Constify Result) - #67702 (Add symbol normalization for proc_macro_server.) - #67730 (Cleanup pattern type checking, fix diagnostics bugs (+ improvements)) - #67744 (parser: reduce diversity in error handling mechanisms) - #67748 (Use function attribute "frame-pointer" instead of "no-frame-pointer-elim") Failed merges: r? @ghost
-
由 Mazdak Farrokhzad 提交于
Use function attribute "frame-pointer" instead of "no-frame-pointer-elim" LLVM 8 ([D56351](http://reviews.llvm.org/D56351)) introduced "frame-pointer". In LLVM 10 (D71863), "no-frame-pointer-elim"/"no-frame-pointer-elim-non-leaf" will be ignored. ----- In the LLVM monorepo, run `git show origin/release/8.x:llvm/lib/CodeGen/TargetOptionsImpl.cpp` to see that `"frame-pointer"` is available since LLVM 8.
-
由 Mazdak Farrokhzad 提交于
parser: reduce diversity in error handling mechanisms Instead of having e.g. `span_err`, `fatal`, etc., we prefer to move towards uniformly using `struct_span_err` thus making it harder to emit fatal and/or unstructured diagnostics. This PR also de-fatalizes some diagnostics. r? @estebank
-
由 Mazdak Farrokhzad 提交于
Cleanup pattern type checking, fix diagnostics bugs (+ improvements) r? @estebank
-
由 Mazdak Farrokhzad 提交于
Add symbol normalization for proc_macro_server. Follow up for #66670, finishing the first bullet point in #55467. r? @petrochenkov
-
由 Mazdak Farrokhzad 提交于
Constify Result r? @oli-obk This is just the `Result`-part of #67494 which I'll resubmit once #66254 has landed.
-
由 Mazdak Farrokhzad 提交于
Extract `rustc_ast_lowering` crate from `rustc` Working towards https://github.com/rust-lang/rust/issues/65031. This PR moves `src/librustc/hir/lowering{/, .rs}` to its own crate (`librustc_ast_lowering`) which is very self-contained (only `fn lower_crate` and `trait Resolver` are exposed). r? @Mark-Simulacrum
-
由 Mazdak Farrokhzad 提交于
-
由 Mazdak Farrokhzad 提交于
-
由 Mazdak Farrokhzad 提交于
-
由 Mazdak Farrokhzad 提交于
-
由 bors 提交于
Move resolve_lifetimes query in librustc_resolve. Split out of #67688 r? @Zoxc
-
- 31 12月, 2019 7 次提交
-
-
由 Lukas Lueg 提交于
-
由 bors 提交于
Rollup of 5 pull requests Successful merges: - #67430 (doc: minus (U+2212) instead of dash (U+002D) for negative infinity) - #67697 (Move the region_scope_tree query to librustc_passes.) - #67719 (Add self to .mailmap) - #67723 (Add error code explanation for E0477) - #67735 (Support `-Z ui-testing=yes/no`) Failed merges: r? @ghost
-
由 Dylan DPC 提交于
Support `-Z ui-testing=yes/no` `ui-testing` is now a boolean option (`-Z ui-testing=yes/no`) and can be specified multiple times with later values overriding earlier values (`-Z ui-testing=yes -Z ui-testing=no` == `-Z ui-testing=no`), so it can be set in a hierarchical way, e.g. UI testing infra may enable it by default with specific tests being able to opt-out. This way we can remove the special opt-out support from `compiletest`. Inspired by https://github.com/rust-lang/rust/pull/67709.
-
由 Dylan DPC 提交于
Add error code explanation for E0477 Part of #61137
-
由 Dylan DPC 提交于
Add self to .mailmap r? @Mark-Simulacrum Cheers.
-
由 Dylan DPC 提交于
Move the region_scope_tree query to librustc_passes. Split out of #67688. r? @Zoxc
-
由 Dylan DPC 提交于
doc: minus (U+2212) instead of dash (U+002D) for negative infinity The documentation for [`f32::NEG_INFINITY`](https://doc.rust-lang.org/std/f32/constant.NEG_INFINITY.html) contains “-∞” with a dash instead of a minus sign, “−∞” with a proper minus sign looks better with the used Source Serif Pro font. Similarly for [`f64::NEG_INFINITY`](https://doc.rust-lang.org/std/f64/constant.NEG_INFINITY.html).
-