about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2021-04-18Use `NotSupported` in more placesChristiaan Dirkx-47/+48
2021-04-18Bump since to 1.52.0CDirkx-1/+1
2021-04-18Update `decode_error_kind` to decode os errors to `NotSupported`Christiaan Dirkx-0/+4
2021-04-18Add and insta-stabilize `std::io::ErrorKind::NotSupported`Christiaan Dirkx-6/+11
2021-04-14Auto merge of #84206 - Dylan-DPC:rollup-knl2jgq, r=Dylan-DPCbors-29/+165
Rollup of 7 pull requests Successful merges: - #82492 (Move `std::sys_common::alloc` to new module `std::sys::common`) - #84177 (Fix join_paths error display.) - #84185 (add more pat2021 tests) - #84191 (Update books) - #84192 (Fix typos in rustc_codegen_ssa/src/back/write.rs.) - #84196 (:arrow_up: rust-analyzer) - #84201 (rustdoc: Note that forbidding anchors in links to primitives is a bug) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-04-15Rollup merge of #84201 - jyn514:primitive-warnings, r=cuviperDylan DPC-0/+9
rustdoc: Note that forbidding anchors in links to primitives is a bug cc https://github.com/rust-lang/rust/issues/83083, https://github.com/rust-lang/rust/pull/84147#discussion_r613518820 r? `@cuviper`
2021-04-15Rollup merge of #84196 - lnicola:rust-analyzer-2021-04-12, r=jonas-schievinkDylan DPC-18/+18
:arrow_up: rust-analyzer
2021-04-15Rollup merge of #84192 - vext01:backend-write-typos, r=wesleywiserDylan DPC-2/+2
Fix typos in rustc_codegen_ssa/src/back/write.rs. Just a couple of typos I spotted when reading this comment about the job server.
2021-04-15Rollup merge of #84191 - ehuss:update-books, r=ehussDylan DPC-0/+0
Update books ## nomicon 1 commits in 6fe476943afd53a9a6e91f38a6ea7bb48811d8ff..8551afbb2ca6f5ea37fe58380318b209785e4e02 2021-03-10 07:28:57 +0900 to 2021-04-01 21:58:50 +0900 - Add example of thinking about Send/Sync's soundness (rust-lang-nursery/nomicon#259) ## reference 10 commits in fd97729e2d82f8b08d68a31c9bfdf0c37a7fd542..e1abb17cd94cd5a8a374b48e1bc8134a2208ed48 2021-03-28 14:29:19 -0700 to 2021-04-07 08:09:48 -0700 - Update introduction.md (rust-lang-nursery/reference#1004) - clarify UB for raw ptr deref (rust-lang-nursery/reference#1000) - Update lint level documentation. (rust-lang-nursery/reference#998) - Add rustdoc to tool lints. (rust-lang-nursery/reference#997) - Link to ptr::addr_of on raw pointer docs (rust-lang-nursery/reference#993) - apply rust-lang-nursery/reference#950 to STYLE.md (rust-lang-nursery/reference#980) - Tuple Passover rust-lang-nursery/reference#2 (rust-lang-nursery/reference#990) - Fix typo in macros-by-example.md (rust-lang-nursery/reference#996) - Clarify object safety rules for methods striked from the vtable (rust-lang-nursery/reference#965) - Add const generic args to const contexts. (rust-lang-nursery/reference#995) ## rust-by-example 1 commits in 29d91f591c90dd18fdca6d23f1a9caf9c139d0d7..c80f0b09fc15b9251825343be910c08531938ab2 2021-03-23 09:03:39 -0300 to 2021-04-08 10:28:17 -0300 - fix compile bug with panic! (rust-lang/rust-by-example#1433) ## rustc-dev-guide 11 commits in 0687daac28939c476df51778f5a1d1aff1a3fddf..a9bd2bbf31e4f92b5d3d8e80b22839d0cc7a2022 2021-03-28 13:33:56 -0400 to 2021-04-09 18:12:21 -0400 - Improve formatting and update info in "method lookup" section - Change wording a bit: `module` => `crate` - fix typo (rust-lang/rustc-dev-guide#1107) - fix typo - Mention CI build of LLVM in build instruction - Fix rustdocs test command typo (rust-lang/rustc-dev-guide#1103) - Update the "LLVM updates" section - Fix a link about Rustdoc internals - Add quickstart for adding a new optimization (rust-lang/rustc-dev-guide#1094) - Add back example of {{cwd}} (rust-lang/rustc-dev-guide#1099) - Document test input normalization ## embedded-book 1 commits in d3f2ace94d51610cf3e3c265705bb8416d37f8e4..569c3391f5c0cc43433bc77831d17f8ff4d76602 2021-03-17 07:53:09 +0000 to 2021-04-07 08:32:11 +0000 - Make it easier to copy and paste example commands. (rust-embedded/book#289)
2021-04-15Rollup merge of #84185 - hi-rustin:rustin-patch-macro, r=nikomatsakisDylan DPC-0/+113
add more pat2021 tests close https://github.com/rust-lang/rust/issues/84138 r? ```@nikomatsakis```
2021-04-15Rollup merge of #84177 - ehuss:join_paths-err, r=kennytmDylan DPC-1/+1
Fix join_paths error display. On unix, the error from `join_paths` looked like this: ``` path segment contains separator `58` ``` This PR changes it to look like this: ``` path segment contains separator `:` ```
2021-04-15Rollup merge of #82492 - CDirkx:sys_common_alloc, r=m-ou-seDylan DPC-8/+22
Move `std::sys_common::alloc` to new module `std::sys::common` https://github.com/rust-lang/rust/blob/6b56603e35b39c9f6cc76782330e5e415f9e43d5/library/std/src/sys_common/mod.rs#L7-L13 It was my impression that the goal for `std::sys` has changed from extracting it into a separate crate to making std work with features. However the fact remains that there is a lot of interdependence between `sys` and `sys_common`, this is because `sys_common` contains two types of code: - abstractions over the different platform implementations in `std::sys` (for example [`std::sys_common::mutex`](https://github.com/rust-lang/rust/blob/master/library/std/src/sys_common/mutex.rs)) - code shared between platforms (for example [`std::sys_common::alloc`](https://github.com/rust-lang/rust/blob/master/library/std/src/sys_common/alloc.rs)) This PR attempts to address this by adding a new module `common` to `std::sys` which will contain code shared between platforms, `alloc.rs` in this case but more can be moved over in the future.
2021-04-14Auto merge of #84130 - Aaron1011:fix/none-delim-lookahead, r=petrochenkovbors-8/+46
Fix lookahead with None-delimited group Fixes https://github.com/rust-lang/rust/issues/84162, a regression introduced by https://github.com/rust-lang/rust/pull/82608.
2021-04-14rustdoc: Note that forbidding anchors in links to primitives is a bugJoshua Nelson-0/+9
2021-04-14:arrow_up: rust-analyzerLaurențiu Nicola-18/+18
2021-04-14Auto merge of #83948 - ABouttefeux:lint-nullprt-deref, r=RalfJungbors-0/+201
add lint deref_nullptr detecting when a null ptr is dereferenced fixes #83856 changelog: add lint that detect code like ```rust unsafe { &*core::ptr::null::<i32>() }; unsafe { addr_of!(std::ptr::null::<i32>()) }; let x: i32 = unsafe {*core::ptr::null()}; let x: i32 = unsafe {*core::ptr::null_mut()}; unsafe {*(0 as *const i32)}; unsafe {*(core::ptr::null() as *const i32)}; ``` ``` warning: Dereferencing a null pointer causes undefined behavior --> src\main.rs:5:26 | 5 | let x: i32 = unsafe {*core::ptr::null()}; | ^^^^^^^^^^^^^^^^^^ | | | a null pointer is dereferenced | this code causes undefined behavior when executed | = note: `#[warn(deref_nullptr)]` on by default ``` Limitation: It does not detect code like ```rust const ZERO: usize = 0; unsafe {*(ZERO as *const i32)}; ``` or code where `0` is not directly a literal
2021-04-14Auto merge of #84158 - cratelyn:patch-extern-c-unwind-behavior, r=nikomatsakisbors-1/+5
move new c abi abort behavior behind feature gate *Background* In #76570, new ABI strings including `C-unwind` were introduced. Their behavior is specified in RFC 2945 <sup>[1]</sup>. However, it was reported in the #ffi-unwind stream of the Rust community Zulip that this had altered the way that `extern "C"` functions behaved even when the `c_unwind` feature gate was not active. <sup>[2]</sup> *Overview* This makes a small patch to `rustc_mir_build::build::should_abort_on_panic`, so that the same behavior from before is in place when the `c_unwind` gate is not active. `rustc_middle::ty::layout::fn_can_unwind` is not touched, as the visible behavior should not differ before/after #76570. <sup>[3]</sup> --- 1: https://github.com/rust-lang/rfcs/blob/master/text/2945-c-unwind-abi.md 2: https://rust-lang.zulipchat.com/#narrow/stream/210922-project-ffi-unwind/topic/Is.20unwinding.20through.20extern.20C.20UB.3F/near/230112325 3: https://github.com/rust-lang/rust/pull/76570/files#diff-b0320c2b8868f325d83c027fc5d71732636e9763551e35895488f30fe057c6e9L2599-R2617 [1]: https://github.com/rust-lang/rfcs/blob/master/text/2945-c-unwind-abi.md [2]: https://rust-lang.zulipchat.com/#narrow/stream/210922-project-ffi-unwind/topic/Is.20unwinding.20through.20extern.20C.20UB.3F/near/230112325 [3]: https://github.com/rust-lang/rust/pull/76570/files#diff-b0320c2b8868f325d83c027fc5d71732636e9763551e35895488f30fe057c6e9L2599-R2617
2021-04-14Fix typos in rustc_codegen_ssa/src/back/write.rs.Edd Barrett-2/+2
2021-04-14Update booksEric Huss-0/+0
2021-04-14test: add reasonable casehi-rustin-2/+2
2021-04-14test: add more caseshi-rustin-3/+69
2021-04-14Auto merge of #83068 - mockersf:method-trait-foreign-impl, r=GuillaumeGomezbors-19/+134
rustdoc: links from items in a trait impl are inconsistent Depending on where the struct implementing a trait is coming from, or the current page, the items in a trait impl are not linking to the same thing: |item| trait page, implementors| trait page, implementations on Foreign Types|struct page, trait implementations| |-|-|-|-| |function| link to current impl|link to first impl in the list|link to trait def |default function | not present |not present |link to trait def |default function with custom impl|link to current impl|link to trait def |link to trait def |constant| link to current impl|link to trait def |link to trait def |associated type| link to current impl|link to trait def |link to trait def ||*missing link to trait def*|*function link wrong + missing link to current impl*|*missing link to current impl*| <details> <summary>rust code with those cases</summary> ```rust pub trait MyTrait { type Assoc; const VALUE: u32; fn trait_function(&self); fn defaulted(&self) {} fn defaulted_override(&self) {} } impl MyTrait for String { /// will link to trait def type Assoc = (); /// will link to trait def const VALUE: u32 = 5; /// will link to first foreign implementor fn trait_function(&self) {} /// will link to trait def fn defaulted_override(&self) {} } impl MyTrait for Vec<u8> { /// will link to trait def type Assoc = (); /// will link to trait def const VALUE: u32 = 5; /// will link to first foreign implementor fn trait_function(&self) {} /// will link to trait def fn defaulted_override(&self) {} } impl MyTrait for MyStruct { /// in trait page, will link to current impl /// /// in struct page, will link to trait def type Assoc = bool; /// in trait page, will link to current impl /// /// in struct page, will link to trait def const VALUE: u32 = 20; /// in trait page, will link to current impl /// /// in struct page, will link to trait def fn trait_function(&self) {} /// in trait page, will link to current impl /// /// in struct page, will link to trait def fn defaulted_override(&self) {} } pub struct MyStruct; ``` </details> In this PR, I fixed all links to target the trait definition, and added an anchor-link to the current implementation appearing on mouse hover.
2021-04-14Update documentationChristiaan Dirkx-5/+17
2021-04-14Move `std::sys_common::alloc` to `std::sys::common`Christiaan Dirkx-3/+5
2021-04-14add macro-or-patterns-2021 testhi-rustin-0/+47
2021-04-14Auto merge of #83762 - camelid:bare-urls-note, r=jyn514bors-0/+35
Add explanatory note to `bare_urls` lint I think the lint is confusing otherwise since it doesn't fully explain what the problem is.
2021-04-13remove line length ignoreFrançois Mockers-2/+0
2021-04-13Fix join_paths error display.Eric Huss-1/+1
2021-04-13forgot test assertions for default methodFrançois Mockers-0/+2
2021-04-13add testFrançois Mockers-0/+65
2021-04-13tidy format rustFrançois Mockers-10/+28
2021-04-13format cssFrançois Mockers-1/+2
2021-04-13fix source link when in a trait implementationFrançois Mockers-8/+30
2021-04-13add anchors links on hover to items from trait implFrançois Mockers-8/+16
2021-04-13fix links from trait impl methods to trait declarationFrançois Mockers-3/+4
2021-04-13Auto merge of #84164 - LingMan:option_option, r=estebankbors-2/+2
Avoid an `Option<Option<_>>` By simply swapping the calls to `map` and `and_then` around the complexity of handling an `Option<Option<_>>` disappears. `@rustbot` modify labels +C-cleanup +T-compiler
2021-04-13Avoid an `Option<Option<_>>`LingMan-2/+2
By simply swapping the calls to `map` and `and_then` around the complexity of handling an `Option<Option<_>>` disappears.
2021-04-13Auto merge of #84135 - rust-lang:GuillaumeGomez-patch-1, r=kennytmbors-1/+1
Improve code example for length comparison Small fix/improvement: it's much safer to check that you're under the length of an array rather than chacking that you're equal to it. It's even more true in case you update the length of the array while iterating.
2021-04-13move new c abi abort behavior behind feature gatekatelyn a. martin-1/+5
### Background In #76570, new ABI strings including `C-unwind` were introduced. Their behavior is specified in RFC 2945 [1]. However, it was reported in the #ffi-unwind stream of the Rust community Zulip that this had altered the way that `extern "C"` functions behaved even when the `c_unwind` feature gate was not active. [2] ### Overview This makes a small patch to `rustc_mir_build::build::should_abort_on_panic`, so that the same behavior from before is in place when the `c_unwind` gate is not active. `rustc_middle::ty::layout::fn_can_unwind` is not touched, as the visible behavior should not differ before/after #76570. [3] ### Footnotes [1]: https://github.com/rust-lang/rfcs/blob/master/text/2945-c-unwind-abi.md [2]: https://rust-lang.zulipchat.com/#narrow/stream/210922-project-ffi-unwind/topic/Is.20unwinding.20through.20extern.20C.20UB.3F/near/230112325 [3]: https://github.com/rust-lang/rust/pull/76570/files#diff-b0320c2b8868f325d83c027fc5d71732636e9763551e35895488f30fe057c6e9L2599-R2617
2021-04-13Auto merge of #84153 - Dylan-DPC:rollup-5jiqrwu, r=Dylan-DPCbors-31/+97
Rollup of 6 pull requests Successful merges: - #83438 (Update RELEASES.md) - #83707 (Remove `T: Debug` bound on UnsafeCell Debug impl) - #84084 (Stabilize duration_zero.) - #84121 (Stabilize BTree{Map,Set}::retain) - #84140 (Don't call bump in check_mistyped_turbofish_with_multiple_type_params) - #84141 (Fix typo in error message) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-04-13Rollup merge of #84141 - camelid:fix-typo, r=Dylan-DPCDylan DPC-4/+7
Fix typo in error message Also tweaked the message a bit by - removing the hyphen, because in my opinion the hyphen makes the message a bit harder to read, especially combined with the backticks; - adding the word "be", because I think it's a bit clearer that way.
2021-04-13Rollup merge of #84140 - b-naber:parser_past_eof, r=varkorDylan DPC-15/+75
Don't call bump in check_mistyped_turbofish_with_multiple_type_params Fixes https://github.com/rust-lang/rust/issues/84117
2021-04-13Rollup merge of #84121 - workingjubilee:stabilize-btree-retain, r=dtolnayDylan DPC-4/+2
Stabilize BTree{Map,Set}::retain Closes #79025. FCP concluded here: https://github.com/rust-lang/rust/issues/79025#issuecomment-817201302 This is an approved feature on BTree{Map,Set} to mirror a functionality in Hash{Map,Set}, which has had some adequate testing since its introduction in https://github.com/rust-lang/rust/pull/79026 and doesn't seem to have caused any problems since.
2021-04-13Rollup merge of #84084 - m-ou-se:stabilize-zero, r=scottmcmDylan DPC-7/+3
Stabilize duration_zero. FCP here: https://github.com/rust-lang/rust/issues/73544#issuecomment-817201305
2021-04-13Rollup merge of #83707 - exrook:unsafecell, r=m-ou-seDylan DPC-1/+1
Remove `T: Debug` bound on UnsafeCell Debug impl Prior art: #65013
2021-04-13Rollup merge of #83438 - CDirkx:releases, r=Mark-SimulacrumDylan DPC-0/+9
Update RELEASES.md A couple of things that were missing in the release notes: - `Div` and `Rem` by their `NonZero` variant is now implemented for all unsigned integers (#79134) - Stabilization of `VecDeque::range` and `VecDeque::range_mut` (#79022, stabilization version corrected to 1.51.0 #80448) - Deprecation of `spin_loop_hint` (#80966)
2021-04-13Auto merge of #84099 - tmiasko:asm-only-x86_64, r=Amanieubors-5/+32
Check for asm support in UI tests that require it Add `needs-asm-support` compiletest directive, and use it in asm tests that require asm support without relying on any architecture specific features. Closes #84038.
2021-04-13Auto merge of #84086 - m-ou-se:stabilze-is-subnormal, r=dtolnaybors-4/+2
Stabilize is_subnormal. FCP completed here: https://github.com/rust-lang/rust/issues/79288#issuecomment-817201311
2021-04-12Add explanatory note to `bare_urls` lintCamelid-0/+35
I think the lint is confusing otherwise since it doesn't fully explain what the problem is.
2021-04-13Auto merge of #84082 - andjo403:stabilize_nonzero_leading_trailing_zeros, ↵bors-10/+37
r=m-ou-se Stabilize nonzero_leading_trailing_zeros Stabilizing nonzero_leading_trailing_zeros and due to this also stabilizing the intrinsic cttz_nonzero FCP finished here: https://github.com/rust-lang/rust/issues/79143#issuecomment-817216153 `@rustbot` modify labels: +T-libs Closes #79143