about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2021-10-11Rollup merge of #89710 - sireliah:e0482, r=GuillaumeGomezMatthias Krüger-2/+75
Add long explanation for error E0482 This is longer explanation for error E0482 in the #61137. Please take a look and leave some feedback!
2021-10-11Rollup merge of #89675 - oli-obk:type_checker, r=davidtwcoMatthias Krüger-81/+53
Re-use TypeChecker instead of passing around some of its fields In the future (for lazy TAIT) we will need more of its fields, but even ignoring that, this change seems reasonable on its own to me.
2021-10-11Rollup merge of #89651 - ibraheemdev:poll-ready, r=dtolnayMatthias Krüger-4/+97
Add `Poll::ready` and revert stabilization of `task::ready!` This PR adds an inherent `ready` method to `Poll` that can be used with the `?` operator as an alternative to the `task::ready!` macro: ```rust let val = ready!(fut.poll(cx)); let val = fut.poll(cx).ready()?; ``` I think this form is a nice, non-breaking middle ground between changing the `impl Try for Poll`, and adding a separate macro. It looks better than `ready!` in my opinion, and it composes well: ```rust let elem = ready!(fut.poll(cx)).pop().unwrap(); let elem = fut.poll(cx).ready()?.pop().unwrap(); ``` The planned stabilization of `ready!` in 1.56 has been reverted because I think this alternate approach is worth considering. r? rust-lang/libs
2021-10-11Rollup merge of #89643 - cjgillot:overlap, r=matthewjasperMatthias Krüger-45/+65
Fix inherent impl overlap check. The current implementation of the overlap check was slightly buggy, and unified the wrong connected component in the `ids.len() <= 1` case. This became visible in another PR which changed the iteration order of items. r? ``@matthewjasper`` since you reviewed the other PR.
2021-10-11Rollup merge of #89471 - nbdd0121:const3, r=fee1-deadMatthias Krüger-26/+64
Use Ancestory to check default fn in const impl instead of comparing idents Fixes https://rust-lang.zulipchat.com/#narrow/stream/146212-t-compiler.2Fconst-eval/topic/Const.20trait.20impl.20inside.20macro
2021-10-11Clarify the error descriptionssireliah-17/+22
2021-10-11Add library tracking issue for poll_ready featureDavid Tolnay-7/+7
2021-10-11Remove task::ready! from 1.56.0 release notesDavid Tolnay-2/+0
2021-10-11Split impl-with-default-fn test into a pass test and a fail testGary Guo-8/+38
2021-10-11Use Ancestory to check default fn in const impl instead of comparing identsGary Guo-18/+26
2021-10-11Auto merge of #83908 - Flying-Toast:master, r=davidtwcobors-315/+292
Add enum_intrinsics_non_enums lint There is a clippy lint to prevent calling [`mem::discriminant`](https://doc.rust-lang.org/std/mem/fn.discriminant.html) with a non-enum type. I think the lint is worthy of being included in rustc, given that `discriminant::<T>()` where `T` is a non-enum has an unspecified return value, and there are no valid use cases where you'd actually want this. I've also made the lint check [variant_count](https://doc.rust-lang.org/core/mem/fn.variant_count.html) (#73662). closes #83899
2021-10-11Auto merge of #89767 - GuillaumeGomez:rollup-sczixhk, r=GuillaumeGomezbors-26/+160
Rollup of 7 pull requests Successful merges: - #89655 (bootstrap: don't use `--merges` to look for commit hashes for downloading artifacts) - #89726 (Add #[must_use] to alloc constructors) - #89729 (Add #[must_use] to core and std constructors) - #89743 (Fix RUSTC_LOG handling) - #89753 (Add #[must_use] to from_value conversions) - #89754 (Cleanup .item-table CSS) - #89761 (:arrow_up: rust-analyzer) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-10-11Rollup merge of #89761 - lnicola:rust-analyzer-2021-10-11, r=lnicolaGuillaume Gomez-18/+17
:arrow_up: rust-analyzer r? ``@ghost``
2021-10-11Rollup merge of #89754 - dns2utf8:rustdoc_cleanup_css, r=GuillaumeGomezGuillaume Gomez-1/+1
Cleanup .item-table CSS The main table-like element must be `display: table;` r? `@GuillaumeGomez`
2021-10-11Rollup merge of #89753 - jkugelman:must-use-from_value-conversions, ↵Guillaume Gomez-1/+50
r=joshtriplett Add #[must_use] to from_value conversions I added two methods to the list myself. Clippy did not flag them because they take `mut` args, but neither modifies their argument. ```rust core::str const unsafe fn from_utf8_unchecked_mut(v: &mut [u8]) -> &mut str; std::ffi::CString unsafe fn from_raw(ptr: *mut c_char) -> CString; ``` I put a custom note on `from_raw`: ```rust #[must_use = "call `drop(from_raw(ptr))` if you intend to drop the `CString`"] pub unsafe fn from_raw(ptr: *mut c_char) -> CString { ``` Parent issue: #89692 r? ``@joshtriplett``
2021-10-11Rollup merge of #89743 - matthewjasper:env-log-fix, r=jyn514Guillaume Gomez-1/+1
Fix RUSTC_LOG handling Rustc was incorrectly reading the value of `RUSTC_LOG` as the environment vairable with the logging configuration, rather than the logging configuration itself.
2021-10-11Rollup merge of #89729 - jkugelman:must-use-core-std-constructors, ↵Guillaume Gomez-0/+36
r=joshtriplett Add #[must_use] to core and std constructors Parent issue: #89692 r? ``@joshtriplett``
2021-10-11Rollup merge of #89726 - jkugelman:must-use-alloc-constructors, r=joshtriplettGuillaume Gomez-2/+40
Add #[must_use] to alloc constructors Added `#[must_use]`. to the various forms of `new`, `pin`, and `with_capacity` in the `alloc` crate. No extra explanations given as I couldn't think of anything useful to add. I figure this deserves extra scrutiny compared to the other PRs I've done so far. In particular: * The 4 `pin`/`pin_in` methods I touched. Are there legitimate use cases for pinning and not using the result? Pinning's a difficult concept I'm not very comfortable with. * `Box`'s constructors. Do people ever create boxes just for the side effects... allocating or zeroing out memory? Parent issue: #89692 r? ``@joshtriplett``
2021-10-11Rollup merge of #89655 - tlyu:find-non-merge-commits, r=jyn514Guillaume Gomez-3/+15
bootstrap: don't use `--merges` to look for commit hashes for downloading artifacts Shallow clones (and possibly worktrees, though I can't seem to reproduce the problem there) can cause `git rev-list --merges` to falsely return no results, even if a merge commit is present. Stop using the `--merges` option when looking for commit hashes that have build artifacts. `--first-parent` and `--author=bors@rust-lang.org` should be sufficient. Also exit with an error if the configuration asks for artifacts to be downloaded and we can't determine an appropriate commit hash to use to download artifacts. Fixes #87890. r? ``@jyn514`` ``@rustbot`` label +A-rustbuild +A-contributor-roadblock
2021-10-11Auto merge of #89709 - clemenswasser:apply_clippy_suggestions_2, r=petrochenkovbors-72/+56
Apply clippy suggestions for rustc and core
2021-10-11Cleanup .item-table CSSStefan Schindler-1/+1
2021-10-11Deprecate mem_discriminant_non_enumflip1995-314/+15
This lint has been uplifted and is now included in enum_intrinsics_non_enums.
2021-10-11Add enum_intrinsics_non_enums lintFlying-Toast-1/+277
2021-10-11Auto merge of #89755 - jkugelman:must-use-conversions-that-move-self, ↵bors-11/+54
r=joshtriplett Add #[must_use] to conversions that move self Everything here got the same message. Is the wording okay? ```rust #[must_use = "`self` will be dropped if the result is not used"] ``` I want to draw attention to these methods in particular: ```rust alloc::sync::Arc<MaybeUninit<T>> unsafe fn assume_init(self) -> Arc<T>; alloc::sync::Arc<[MaybeUninit<T>]> unsafe fn assume_init(self) -> Arc<[T]>; core::pin::Pin<&'a mut T> const fn into_ref(self) -> Pin<&'a T>; core::pin::Pin<&'a mut T> const fn get_mut(self) -> &'a mut T; core::pin::Pin<&'a mut T> const unsafe fn get_unchecked_mut(self) -> &'a mut T; core::pin::Pin<&'a mut T> unsafe fn map_unchecked_mut(self, func: F) -> Pin<&'a mut U>; core::pin::Pin<&'a mut Pin<P>> fn as_deref_mut(self) -> Pin<&'a mut P::Target>; ``` Parent issue: #89692 r? `@joshtriplett`
2021-10-11:arrow_up: rust-analyzerLaurențiu Nicola-18/+17
2021-10-11Remove unnecessary variableClemens Wasser-2/+1
2021-10-11Auto merge of #89597 - michaelwoerister:improve-vtable-debuginfo, r=wesleywiserbors-62/+163
Create more accurate debuginfo for vtables. Before this PR all vtables would have the same name (`"vtable"`) in debuginfo. Now they get an unambiguous name that identifies the implementing type and the trait that is being implemented. This is only one of several possible improvements: - This PR describes vtables as arrays of `*const u8` pointers. It would nice to describe them as structs where function pointer is represented by a field with a name indicative of the method it maps to. However, this requires coming up with a naming scheme that avoids clashes between methods with the same name (which is possible if the vtable contains multiple traits). - The PR does not update the debuginfo we generate for the vtable-pointer field in a fat `dyn` pointer. Right now there does not seem to be an easy way of getting ahold of a vtable-layout without also knowing the concrete self-type of a trait object. r? `@wesleywiser`
2021-10-11Auto merge of #89752 - matthiaskrgr:rollup-v4fgmwg, r=matthiaskrgrbors-151/+203
Rollup of 6 pull requests Successful merges: - #89579 (Add regression test for issue 80108) - #89632 (Fix docblock code display on mobile) - #89691 (Move `DebuggerCommands` and `check_debugger_output` to a separate module) - #89707 (Apply clippy suggestions for std) - #89722 (Fix spelling: Cannonical -> Canonical) - #89736 (Remove unused CSS rule) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-10-10Add #[must_use] to conversions that move selfJohn Kugelman-11/+54
2021-10-10Add #[must_use] to from_value conversionsJohn Kugelman-1/+50
2021-10-11Rollup merge of #89736 - GuillaumeGomez:rm-unused-css-rule, r=dns2utf8Matthias Krüger-2/+0
Remove unused CSS rule As you can see in the firefox devtools: ![Screenshot from 2021-10-10 14-28-08](https://user-images.githubusercontent.com/3050060/136695689-16c77ceb-b1ab-40df-963a-048f2258e217.png) It needs the display to be `grid` or `inline-grid`, which isn't the case. r? `@dns2utf8`
2021-10-11Rollup merge of #89722 - jkugelman:cannonical-typo, r=joshtriplettMatthias Krüger-8/+8
Fix spelling: Cannonical -> Canonical
2021-10-11Rollup merge of #89707 - clemenswasser:apply_clippy_suggestions, ↵Matthias Krüger-16/+13
r=Mark-Simulacrum Apply clippy suggestions for std
2021-10-11Rollup merge of #89691 - Nicholas-Baron:debugger_commands, r=Mark-SimulacrumMatthias Krüger-125/+151
Move `DebuggerCommands` and `check_debugger_output` to a separate module Work towards #89475. As part of this move, the public functions were changed to return `Result`. This is so that the error handling that initially took `&self: TestCx` can still use that `TestCx`.
2021-10-11Rollup merge of #89632 - GuillaumeGomez:fix-docblock-code, r=jshaMatthias Krüger-0/+16
Fix docblock code display on mobile Fixes https://github.com/rust-lang/rust/issues/89618. Before: ![Screenshot from 2021-10-07 12-01-37](https://user-images.githubusercontent.com/3050060/136363624-72bedddd-b45e-48a0-89b4-6563612f8677.png) After: ![Screenshot from 2021-10-07 20-17-21](https://user-images.githubusercontent.com/3050060/136440704-fa9ffa68-8e94-46a7-b556-c41aa5153750.png) r? `@jsha`
2021-10-11Rollup merge of #89579 - workingjubilee:regression-test-80108, r=Mark-SimulacrumMatthias Krüger-0/+15
Add regression test for issue 80108 Closes #80108
2021-10-10Auto merge of #89541 - workingjubilee:abbrev-shufvec-t, r=Mark-Simulacrumbors-358/+205
Cleanup src/test/ui/{simd,simd-intrinsic} Initial motivation was to simplify a huge macro expansion using a tuple, since we can just use an array in `#[repr(simd)]` now for the same result. But also, several tests were going unnoticed during development of SIMD intrinsics because people kept looking in the wrong directory, and many are basically run-pass vs. build-fail versions of the same tests, so let's keep them close together and simplify their names, so they're easier to sift through.
2021-10-10Add regression test for issue 80108Jubilee Young-0/+15
2021-10-10Auto merge of #89739 - matthiaskrgr:rollup-kskwqy5, r=matthiaskrgrbors-71/+518
Rollup of 11 pull requests Successful merges: - #88374 (Fix documentation in Cell) - #88713 (Improve docs for int_log) - #89428 (Feature gate the non_exhaustive_omitted_patterns lint) - #89438 (docs: `std::hash::Hash` should ensure prefix-free data) - #89520 (Don't rebuild GUI test crates every time you run test src/test/rustdoc-gui) - #89705 (Cfg hide no_global_oom_handling and no_fp_fmt_parse) - #89713 (Fix ABNF of inline asm options) - #89718 (Add #[must_use] to is_condition tests) - #89719 (Add #[must_use] to char escape methods) - #89720 (Add #[must_use] to math and bit manipulation methods) - #89735 (Stabilize proc_macro::is_available) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-10-10Fix RUSTC_LOG handlingMatthew Jasper-1/+1
Rustc was incorrectly reading the value of `RUSTC_LOG` as the environment vairable with the logging configuration, rather than the logging configuration itself.
2021-10-10Rollup merge of #89735 - bjorn3:stabilize_proc_macro_is_available, ↵Matthias Krüger-4/+1
r=petrochenkov Stabilize proc_macro::is_available Tracking issue: https://github.com/rust-lang/rust/issues/71436 The FCP for the stabilization of `proc_macro::is_available` has completed.
2021-10-10Rollup merge of #89720 - jkugelman:must-use-math-operations, r=joshtriplettMatthias Krüger-19/+255
Add #[must_use] to math and bit manipulation methods Also tidied up a few other nearby `#[must_use]`s. Parent issue: #89692
2021-10-10Rollup merge of #89719 - jkugelman:must-use-char-escape-methods, r=joshtriplettMatthias Krüger-0/+6
Add #[must_use] to char escape methods Parent issue: #89692
2021-10-10Rollup merge of #89718 - jkugelman:must-use-is_condition-tests, r=joshtriplettMatthias Krüger-0/+61
Add #[must_use] to is_condition tests There's nothing insightful to say about these so I didn't write any extra explanations. Parent issue: #89692
2021-10-10Rollup merge of #89713 - nbdd0121:doc2, r=AmanieuMatthias Krüger-1/+1
Fix ABNF of inline asm options This is the case since #73227. r? `@camelid`
2021-10-10Rollup merge of #89705 - nbdd0121:doc, r=GuillaumeGomezMatthias Krüger-0/+2
Cfg hide no_global_oom_handling and no_fp_fmt_parse These are unstable sysroot customisation cfg options that only projects building their own sysroot will use (e.g. Rust-for-linux). Most users shouldn't care. `no_global_oom_handling` can be especially annoying since it's applied on many commonly used alloc crate methods (e.g. `Box::new`, `Vec::push`). r? ```@GuillaumeGomez```
2021-10-10Rollup merge of #89520 - GuillaumeGomez:cache-rustdoc-gui-test, ↵Matthias Krüger-1/+1
r=Mark-Simulacrum Don't rebuild GUI test crates every time you run test src/test/rustdoc-gui This method has multiple advantages: * It'll completely remove the rustdoc-GUI test doc folder if rustdoc was updated * It'll rebuild GUI test crates only they have been updated All in all, it's quite convenient! (even more with https://github.com/rust-lang/rust/pull/88816) r? ```@Mark-Simulacrum```
2021-10-10Rollup merge of #89438 - pierwill:prefix-free-hash, r=AmanieuMatthias Krüger-0/+12
docs: `std::hash::Hash` should ensure prefix-free data Attempt to synthesize the discussion in #89429 into a suggestion regarding `Hash` implementations (not a hard requirement). Closes #89429.
2021-10-10Rollup merge of #89428 - DevinR528:reachable-featuregate, r=Nadrieril,camelidMatthias Krüger-20/+154
Feature gate the non_exhaustive_omitted_patterns lint Fixes https://github.com/rust-lang/rust/issues/89374 Add the machinery to gate the new `non_exhaustive_omitted_patterns` lint. relates to https://github.com/rust-lang/rust/pull/89105 and https://github.com/rust-lang/rust/pull/89423
2021-10-10Rollup merge of #88713 - falk-hueffner:int-log10-documentation-fixes, r=scottmcmMatthias Krüger-25/+24
Improve docs for int_log * Clarify rounding. * Avoid "wrapping" wording. * Omit wrong claim on 0 only being returned in error cases. * Typo fix for one_less_than_next_power_of_two.