- 12 1月, 2020 1 次提交
-
-
由 Andy Russell 提交于
-
- 11 1月, 2020 39 次提交
-
-
由 bors 提交于
Promote references to constants instead of statics r? @oli-obk
-
由 Oliver Scherer 提交于
-
由 bors 提交于
Rollup of 8 pull requests Successful merges: - #67756 (Collector tweaks) - #67889 (Compile some CGUs in parallel at the start of codegen) - #67930 (Rename Result::as_deref_ok to as_deref) - #68018 (feature_gate: Remove `GateStrength`) - #68070 (clean up E0185 explanation) - #68072 (Fix ICE #68058) - #68114 (Don't require `allow_internal_unstable` unless `staged_api` is enabled.) - #68120 (Ban `...X` pats, harden tests, and improve diagnostics) Failed merges: r? @ghost
-
由 Mazdak Farrokhzad 提交于
Ban `...X` pats, harden tests, and improve diagnostics Follow up to https://github.com/rust-lang/rust/pull/67258#issuecomment-565656155 and https://github.com/rust-lang/rust/pull/67258#discussion_r357879932. r? @cramertj @oli-obk
-
由 Mazdak Farrokhzad 提交于
Don't require `allow_internal_unstable` unless `staged_api` is enabled. #63770 changed `qualify_min_const_fn` to require `allow_internal_unstable` for *all* crates that used an unstable feature, regardless of whether `staged_api` was enabled or the `fn` that used that feature was stably const. In practice, this meant that every crate in the ecosystem that wanted to use nightly features added `#![feature(const_fn)]`, which skips `qualify_min_const_fn` entirely. After this PR, crates that do not have `#![feature(staged_api)]` will only need to enable the feature they are interested in. For example, `#![feature(const_if_match)]` will be enough to enable `if` and `match` in constants. Crates with `staged_api` (e.g., `libstd`) require `#[allow_internal_unstable]` to be added to a function if it uses nightly features unless that function is also marked `#[rustc_const_unstable]`. This prevents proliferation of `#[allow_internal_unstable]` into functions that are not callable in a `const` context on stable. r? @oli-obk (author of #63770) cc @Centril
-
由 Mazdak Farrokhzad 提交于
Fix ICE #68058 Fixes #68058 r? @petrochenkov
-
由 Mazdak Farrokhzad 提交于
clean up E0185 explanation r? @Dylan-DPC
-
由 Mazdak Farrokhzad 提交于
feature_gate: Remove `GateStrength` The "soft feature gating" from `feature_gate/check.rs` is unused, and even if it were used, hardcoded warning is not a good solution and [deny-by-default lint](https://github.com/rust-lang/rust/issues/64266) would be a better way to do this. cc https://github.com/rust-lang/rust/pull/67806#discussion_r363091701 r? @Centril
-
由 Mazdak Farrokhzad 提交于
Rename Result::as_deref_ok to as_deref Addresses https://github.com/rust-lang/rust/issues/50264#issuecomment-533952247 r? @dtolnay
-
由 Mazdak Farrokhzad 提交于
Compile some CGUs in parallel at the start of codegen This brings the compilation time for `syntex_syntax` from 11.542s to 10.453s with 6 threads in non-incremental debug mode. Just compiling `n` CGUs in parallel at the beginning of codegen seems sufficient to get rid of the staircase effect, at least for `syntex_syntax`. Based on https://github.com/rust-lang/rust/pull/67777. r? @michaelwoerister cc @alexcrichton @Mark-Simulacrum
-
由 Mazdak Farrokhzad 提交于
Collector tweaks r? @Mark-Simulacrum
-
由 Vadim Petrochenkov 提交于
-
由 Mazdak Farrokhzad 提交于
Also fix a bug with the span passed in `mk_range`.
-
由 bors 提交于
Point at the span for the definition of crate foreign ADTs Follow up to #65421. Partially addresses #65386. Blocked on #53081.
-
由 ecstatic-morse 提交于
Co-Authored-By: NMazdak Farrokhzad <twingoow@gmail.com>
-
由 Lzu Tao 提交于
-
由 Lzu Tao 提交于
-
由 bors 提交于
Rollup of 8 pull requests Successful merges: - #67666 (make use of pointer::is_null) - #67806 (Extract `rustc_ast_passes`, move gating, & refactor linting) - #68043 (Add some missing timers) - #68074 (Add `llvm-skip-rebuild` flag to `x.py`) - #68079 (Clarify suggestion for E0013) - #68084 (Do not ICE on unicode next point) - #68102 (Inline some conversion methods around OsStr) - #68106 (Fix issue with using `self` module via indirection) Failed merges: r? @ghost
-
由 Mazdak Farrokhzad 提交于
Fix issue with using `self` module via indirection Fixes https://github.com/rust-lang/rust/issues/68103.
-
由 Mazdak Farrokhzad 提交于
Inline some conversion methods around OsStr Diff on the assembly of this snippet before and after this PR: https://www.diffchecker.com/NeGMjaJ2 ```rust use std::env; use std::io; use std::path::{Path, PathBuf}; pub fn cargo_home_with_cwd(cwd: &Path) -> io::Result<PathBuf> { match env::var_os("CARGO_HOME").filter(|h| !h.is_empty()) { Some(home) => { let home = PathBuf::from(home); if home.is_absolute() { Ok(home) } else { Ok(cwd.join(&home)) } } _ => env::home_dir() .map(|p| p.join(".cargo")) .ok_or_else(|| io::Error::new(io::ErrorKind::Other, "could not find cargo home dir")), } } ```
-
由 Mazdak Farrokhzad 提交于
Do not ICE on unicode next point Use `shrink_to_hi` instead of `next_point` and fix `next_point`. Fix #68000, fix #68091, fix #68092.
-
由 Mazdak Farrokhzad 提交于
Clarify suggestion for E0013 Fixes https://github.com/rust-lang/rust/issues/68038.
-
由 Mazdak Farrokhzad 提交于
Add `llvm-skip-rebuild` flag to `x.py` This PR follows on from #67437 to complete the feature request from #65612. Specifically it adds a new command-line flag, `--llvm-skip-rebuild`, which overrides both any value set in `config.toml` and the default value (`false`). I'm not 100% confident that I've implemented the override in the "best" way, but I've checked it locally and it seems to work at least. This option isn't currently mentioned in the Guide to Rustc Development. I'd be happy to write something on it if folk think that's worthwhile.
-
由 Mazdak Farrokhzad 提交于
Add some missing timers Based on https://github.com/rust-lang/rust/pull/67988 r? @wesleywiser
-
由 Mazdak Farrokhzad 提交于
Extract `rustc_ast_passes`, move gating, & refactor linting Based on https://github.com/rust-lang/rust/pull/67770. This PR extracts a crate `rustc_ast_passes`: - `ast_validation.rs`, which is contributed by `rustc_passes` (now only has HIR based passes) -- the goal here is to improve recompilation of the parser, - `feature_gate.rs`, which is contributed by `syntax` and performs post-expansion-gating & final erroring for pre-expansion gating, - `show_span`, which is contributed by `syntax`. To facilitate this, we first have to also: - Move `{leveled_}feature_err{_err}` from `syntax::feature_gate::check` into `rustc_session::parse`. - Move `get_features` into `rustc_parse::config`, the only place it is used. - Move some some lint datatypes and traits, e.g. `LintBuffer`, `BufferedEarlyLint`, `BuiltinLintDiagnostics`, `LintPass`, and `LintArray` into `rustc_session::lint`. - Move all the hard-wired lint `static`s into `rustc_session::lint::builtin`.
-
由 Mazdak Farrokhzad 提交于
make use of pointer::is_null r? @Mark-Simulacrum
-
由 Dylan MacKenzie 提交于
-
由 Dylan MacKenzie 提交于
This flag opts out of the min-const-fn checks entirely, which is usually not what we want. The few cases where the flag is still necessary have been annotated.
-
由 Mazdak Farrokhzad 提交于
-
由 Mazdak Farrokhzad 提交于
-
由 Mazdak Farrokhzad 提交于
-
由 Mazdak Farrokhzad 提交于
-
由 Mazdak Farrokhzad 提交于
-
由 Mazdak Farrokhzad 提交于
-
由 Mazdak Farrokhzad 提交于
-
由 Mazdak Farrokhzad 提交于
-
由 Mazdak Farrokhzad 提交于
-
由 Mazdak Farrokhzad 提交于
-
由 Mazdak Farrokhzad 提交于
-