- 01 1月, 2021 16 次提交
-
-
由 bors 提交于
Add edition 2021.
🎆 Happy new ~~year~~ Rust.🍾 This adds --edition=2021, and updates suggestions about 2018 to say "2018 *or later*". Related Cargo PR: https://github.com/rust-lang/cargo/pull/8922 --- Edit: This adds the new edition as *unstable*. Without `-Z unstable-options`, `--edition=2021` results in: ``` $ rustc --edition=2021 error: edition 2021 is unstable and only available with -Z unstable-options. ``` -
由 bors 提交于
Rollup of 8 pull requests Successful merges: - #80323 (Update and improve `rustc_codegen_{llvm,ssa}` docs) - #80368 (rustdoc: Render visibilities succinctly) - #80514 (Fix broken ./x.py install) - #80519 (Take type defaults into account in suggestions to reorder generic parameters) - #80526 (Update LLVM) - #80532 (remove unnecessary trailing semicolon from bootstrap) - #80548 (FIx ICE on wf check for foreign fns) - #80551 (support pattern as const parents in type_of) Failed merges: - #80547 (In which we start to parse const generics defaults) r? `@ghost` `@rustbot` modify labels: rollup
-
由 Dylan DPC 提交于
support pattern as const parents in type_of nice to know that there's still stuff about rust i didn't know about
😆 fixes #80531 r? `@varkor` -
由 Dylan DPC 提交于
FIx ICE on wf check for foreign fns Fixes #80468 r? `@davidtwco` `@lcnr`
-
由 Dylan DPC 提交于
remove unnecessary trailing semicolon from bootstrap
-
由 Dylan DPC 提交于
Update LLVM - [GlobalISel][IRTranslator] Fix a crash when the use of an extractvalue is a non-dominated metadata use. - [asan] Use dynamic shadow memory position on Apple Silicon macOS r? ``@cuviper``
-
由 Dylan DPC 提交于
Take type defaults into account in suggestions to reorder generic parameters Fixes #80512
-
由 Dylan DPC 提交于
Fix broken ./x.py install During my tarball refactorings in https://github.com/rust-lang/rust/pull/79788 I changed the directory layout used by the tarball generation code, and that broke the other parts of rustbuild which hardcoded the paths of those directories. Namely, `./x.py install` relied on the uncompressed copy of the tarball left behind by `fabricate`/`rust-installer`, causing https://github.com/rust-lang/rust/issues/80494. While the easy fix for https://github.com/rust-lang/rust/issues/80494 would've been to just update the hardcoded paths to match the new structure, that fix would leave us in the same situation if we were to change the directory layout again in the future. Instead I refactored the code to return a `GeneratedTarball` struct as the output of all the dist steps, and I put all the paths the rest of rustbuild needs to care about in its fields. That way, future changes to `src/bootstrap/tarball.rs` will not break other stuff. This PR is best reviewed commit-by-commit. r? `@Mark-Simulacrum` `@rustbot` modify labels: beta-nominated beta-accepted T-release
-
由 Dylan DPC 提交于
rustdoc: Render visibilities succinctly Fixes #79139. r? `@jyn514`
-
由 Dylan DPC 提交于
Update and improve `rustc_codegen_{llvm,ssa}` docs Fixes #75342. These docs were very out of date and misleading. They even said that they codegen'd the *AST*! For some reason, the `rustc_codegen_ssa::base` docs were exactly identical to the `rustc_codegen_llvm::base` docs. They didn't really make sense, because they had LLVM-specific information even though `rustc_codegen_ssa` is supposed to be somewhat generic. So I removed them as they were misleading. r? ``@pnkfelix`` maybe?
-
由 Camelid 提交于
-
由 Camelid 提交于
-
由 Mara Bos 提交于
-
由 Mara Bos 提交于
-
由 Mara Bos 提交于
-
由 Mara Bos 提交于
-
- 31 12月, 2020 24 次提交
-
-
由 bors 提交于
Implement edition-based macro :pat feature This PR does two things: 1. Fixes the perf regression from https://github.com/rust-lang/rust/pull/80100#issuecomment-750893149 2. Implements `:pat2018` and `:pat2021` matchers, as described by `@joshtriplett` in https://github.com/rust-lang/rust/issues/54883#issuecomment-745509090 behind the feature gate `edition_macro_pat`. r? `@petrochenkov` cc `@Mark-Simulacrum`
-
由 Bastian Kauschke 提交于
-
由 bors 提交于
The return of the GroupBy and GroupByMut iterators on slice According to https://github.com/rust-lang/rfcs/pull/2477#issuecomment-742034372, I am opening this PR again, this time I implemented it in safe Rust only, it is therefore much easier to read and is completely safe. This PR proposes to add two new methods to the slice, the `group_by` and `group_by_mut`. These two methods provide a way to iterate over non-overlapping sub-slices of a base slice that are separated by the predicate given by the user (e.g. `Partial::eq`, `|a, b| a.abs() < b.abs()`). ```rust let slice = &[1, 1, 1, 3, 3, 2, 2, 2]; let mut iter = slice.group_by(|a, b| a == b); assert_eq!(iter.next(), Some(&[1, 1, 1][..])); assert_eq!(iter.next(), Some(&[3, 3][..])); assert_eq!(iter.next(), Some(&[2, 2, 2][..])); assert_eq!(iter.next(), None); ``` [An RFC](https://github.com/rust-lang/rfcs/pull/2477) was open 2 years ago but wasn't necessary.
-
由 Clément Renault 提交于
-
由 Clément Renault 提交于
-
由 Pietro Albini 提交于
-
由 Pietro Albini 提交于
The struct will allow to store more context on the generated tarballs.
-
由 Pietro Albini 提交于
Files in the temporary directory are used by ./x.py install.
-
由 bors 提交于
Rustdoc render public underscore_imports as Re-exports Fixes #61592
-
由 bors 提交于
Fixes #61592
-
由 bors 提交于
Remove all doc_comment!{} hacks by using #[doc = expr] where needed. This replaces about 200 cases of `````rust doc_comment! { concat!("The smallest value that can be represented by this integer type. # Examples Basic usage: ``` ", $Feature, "assert_eq!(", stringify!($SelfT), "::MIN, ", stringify!($Min), ");", $EndFeature, " ```"), #[stable(feature = "assoc_int_consts", since = "1.43.0")] pub const MIN: Self = !0 ^ ((!0 as $UnsignedT) >> 1) as Self; } ````` by ```rust /// The smallest value that can be represented by this integer type. /// /// # Examples /// /// Basic usage: /// /// ``` #[doc = concat!("assert_eq!(", stringify!($SelfT), "::MIN, ", stringify!($Min), ");")] /// ``` #[stable(feature = "assoc_int_consts", since = "1.43.0")] pub const MIN: Self = !0 ^ ((!0 as $UnsignedT) >> 1) as Self; ``` --- **Note:** For a usable diff, make sure to enable 'ignore whitspace': https://github.com/rust-lang/rust/pull/79150/files?diff=unified&w=1
-
由 bors 提交于
Add `#[track_caller]` to `bug!` and `register_renamed` Before: ``` thread 'rustc' panicked at 'compiler/rustc_lint/src/context.rs:267:18: invalid lint renaming of broken_intra_doc_links to rustdoc::broken_intra_doc_links', compiler/rustc_middle/src/util/bug.rs:34:26 ``` After: ``` thread 'rustc' panicked at 'src/librustdoc/core.rs:455:24: invalid lint renaming of broken_intra_doc_links to rustdoc::broken_intra_doc_links', compiler/rustc_middle/src/util/bug.rs:35:26 ``` The reason I added it to `register_renamed` too is that any panic in that function will be the caller's fault.
-
由 Yuki Okushi 提交于
-
由 Camelid 提交于
-
由 Camelid 提交于
-
由 Camelid 提交于
Co-authored-by: NJoshua Nelson <jyn514@gmail.com>
-
由 Camelid 提交于
-
由 bors 提交于
Only produce .xz tarballs on CI This PR adds a `./configure` option to choose which tarball compression formats to produce, and changes our CI configuration to only produce `.xz` tarballs. The release process will then recompress everything into `.gz` when producing a release. This will drastically reduce our storage costs for CI artifacts, as we'd stop storing the same data twice. **Stable, beta and nightly releases will not be affected by this at all.** Before landing this we'll need to increase the VM size of our release process, to recompress everything in a reasonable amount of time. r? `@Mark-Simulacrum`
-
由 Mara Bos 提交于
-
由 Mara Bos 提交于
-
由 Mara Bos 提交于
-
由 bors 提交于
Rollup of 9 pull requests Successful merges: - #78934 (refactor: removing library/alloc/src/vec/mod.rs ignore-tidy-filelength) - #79479 (Add `Iterator::intersperse`) - #80128 (Edit rustc_ast::ast::FieldPat docs) - #80424 (Don't give an error when creating a file for the first time) - #80458 (Some Promotion Refactoring) - #80488 (Do not create dangling &T in Weak<T>::drop) - #80491 (Miri: make size/align_of_val work for dangling raw ptrs) - #80495 (Rename kw::Invalid -> kw::Empty) - #80513 (Add regression test for #80062) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 max-heller 提交于
-
由 Mara Bos 提交于
Add regression test for #80062 Closes #80062. r? `@lcnr`
-