about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2021-03-16Auto merge of #83199 - JohnTitor:rollup-zrfk94a, r=JohnTitorbors-110/+196
Rollup of 10 pull requests Successful merges: - #81822 (Added `try_exists()` method to `std::path::Path`) - #83072 (Update `Vec` docs) - #83077 (rustdoc: reduce GC work during search) - #83091 (Constify `copy` related functions) - #83156 (Fall-back to sans-serif if Arial is not available) - #83157 (No background for code in portability snippets) - #83160 (Deprecate RustcEncodable and RustcDecodable.) - #83162 (Specify *.woff2 files as binary) - #83172 (More informative diagnotic from `x.py test` attempt atop beta checkout) - #83196 (Use delay_span_bug instead of panic in layout_scalar_valid_range) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-03-16Rollup merge of #83196 - tmiasko:valid-range-delay-span-bug, r=oli-obkYuki Okushi-7/+23
Use delay_span_bug instead of panic in layout_scalar_valid_range #83054 introduced validation of scalar range attributes, but panicking code that uses the attribute remained reachable. Use `delay_span_bug` instead to avoid the ICE. Fixes #83180.
2021-03-16Rollup merge of #83172 - ↵Yuki Okushi-0/+13
pnkfelix:bootstrap-tell-me-what-to-do-about-tidy-on-beta, r=Mark-Simulacrum More informative diagnotic from `x.py test` attempt atop beta checkout Make bootstrap be more informative when one does `x.py test` on a beta checkout without other mods. To be clear, by default running `x.py test` on a checkout of the beta branch currently fails, and with this change will continue to fail, because `x.py tests` runs `x.py test src/tools/tidy` which tries to run `rustfmt` and that will fail because the `rustfmt` binary is pinned to the current nighlty and we do not attempt to distribute one for the beta builds. This change gives a better error message than the current message, which is just "./x.py fmt is not supported on this channel" without providing any hint about what one might do about that problem.
2021-03-16Rollup merge of #83162 - jfrimmel:woff2, r=Mark-SimulacrumYuki Okushi-0/+1
Specify *.woff2 files as binary This prevents older git versions to change the "line endings". Fixes #83159.
2021-03-16Rollup merge of #83160 - m-ou-se:deprecate-rustc-serialize-derives, ↵Yuki Okushi-2/+10
r=petrochenkov Deprecate RustcEncodable and RustcDecodable. We can't remove the `RustcEncodable` and `RustcDecodable` derive macros from the prelude, but we can deprecate them.
2021-03-16Rollup merge of #83157 - nagisa:nagisa/portability-background, r=GuillaumeGomezYuki Okushi-9/+3
No background for code in portability snippets This better matches the appearance of this kind of snippet in the full item view and is less jarring to read due to repeated foreground-background changes. ![Listing of items in a module with some portability snippets attached to some of the items (light theme). The portability snippet has a light blue background and all of the text in it, monospace or not, is the same colour – black](https://user-images.githubusercontent.com/679122/111196363-1900f500-85b5-11eb-8f97-e283c59002a4.png) ![Listing of items in a module with some portability snippets attached to some of the items (dark theme). The portability snippet has a light blue background and all of the text in it, monospace or not, is the same colour – black](https://user-images.githubusercontent.com/679122/111196366-19998b80-85b5-11eb-9914-4d14d9d13ed3.png) There should be no observable changes to the ayu theme.
2021-03-16Rollup merge of #83156 - nagisa:nagisa/sans-serif-please, r=GuillaumeGomezYuki Okushi-4/+5
Fall-back to sans-serif if Arial is not available Otherwise on systems where Arial is not available the UA will fallback to a serif font, rather than a sans-serif one. This is especially relevant on acessibility-conscious setups (such as is mine) that have web-fonts disabled and a limited set of fonts available on the system. r? ```@GuillaumeGomez``` cc ```@jsha```
2021-03-16Rollup merge of #83091 - usbalbin:const_copy, r=oli-obkYuki Okushi-36/+30
Constify `copy` related functions Constify * `*const T::copy_to[_nonoverlapping]` * `*mut T::copy_to[_nonoverlapping]` * `*mut T::copy_from[_nonoverlapping]` * `mem::transmute_copy` * `mem::swap` * `ptr::swap[_nonoverlapping]` * `mem::replace` * `ptr::replace`
2021-03-16Rollup merge of #83077 - notriddle:gc-cleanup-rustdoc-search, r=GuillaumeGomezYuki Okushi-49/+78
rustdoc: reduce GC work during search
2021-03-16Rollup merge of #83072 - henryboisdequin:patch-1, r=Dylan-DPCYuki Okushi-3/+3
Update `Vec` docs Fix typos/nits in `Vec` docs
2021-03-16Rollup merge of #81822 - Kixunil:path_try_exists, r=kennytmYuki Okushi-0/+30
Added `try_exists()` method to `std::path::Path` This method is similar to the existing `exists()` method, except it doesn't silently ignore the errors, leading to less error-prone code. This change intentionally does NOT touch the documentation of `exists()` nor recommend people to use this method while it's unstable. Such changes are reserved for stabilization to prevent confusing people. Apart from that it avoids conflicts with #80979. `@joshtriplett` requested this PR in [internals discussion](https://internals.rust-lang.org/t/the-api-of-path-exists-encourages-broken-code/13817/25?u=kixunil)
2021-03-16Auto merge of #82838 - Amanieu:rustdoc_asm, r=nagisabors-45/+139
Allow rustdoc to handle asm! of foreign architectures This allows rustdoc to process code containing `asm!` for architectures other than the current one. Since this never reaches codegen, we just replace target-specific registers and register classes with a dummy one. Fixes #82869
2021-03-16Filled tracking issue for path_try_existsMartin Habovstiak-1/+1
This adds the ID of the tracking issue to the feature.
2021-03-16Auto merge of #82898 - oli-obk:tait_🧊, r=nikomatsakisbors-686/+5447
Add a `min_type_alias_impl_trait` feature gate This new feature gate only permits type alias impl trait to be constrained by function and trait method return types. All other possible constraining sites like const/static types, closure return types and binding types are now forbidden and gated under the `type_alias_impl_trait` and `impl_trait_in_bindings` feature gates (which are both marked as incomplete, as they have various ways to ICE the compiler or cause query cycles where they shouldn't). r? `@nikomatsakis` This is best reviewed commit-by-commit
2021-03-15Make bootstrap be more informative when one does `x.py test` on a beta ↵Felix S. Klock II-0/+13
checkout without other mods. To be clear, by default running `x.py test` on a checkout of the beta branch currently fails, and with this change will continue to fail, because `x.py tests` runs `x.py test src/tools/tidy` which tries to run `rustfmt` and that will fail because the `rustfmt` binary is pinned to the current nighlty and we do not attempt to distribute one for the beta builds. This change gives a better error message than the current message, which is just "./x.py fmt is not supported on this channel" without providing any hint about what one might do about that problem. (update: placated tidy.)
2021-03-16Auto merge of #83153 - Aaron1011:eval-always-extern_mod_stmt_cnum, ↵bors-0/+2
r=michaelwoerister Mark `extern_mod_stmt_cnum` as `eval_always` This query reads from global untracked state, so it always needs to be evaluated.
2021-03-16Use delay_span_bug instead of panic in layout_scalar_valid_rangeTomasz Miąsko-7/+23
83054 introduced validation of scalar range attributes, but panicking code that uses the attribute remained reachable. Use `delay_span_bug` instead to avoid the ICE.
2021-03-15Constify mem::transmute_copyAlbin Hedman-1/+2
2021-03-15Constify mem::replace and ptr::replaceAlbin Hedman-2/+4
2021-03-15Constify mem::swap and ptr::swap[_nonoverlapping]Albin Hedman-27/+12
2021-03-15Constify copy_to and copy_fromAlbin Hedman-6/+12
2021-03-15Deprecate RustcEncodable and RustcDecodable.Mara Bos-2/+10
2021-03-15Specify *.woff2 files as binaryJulian Frimmel-0/+1
This prevents older git versions to change the "line endings".
2021-03-15Declare `word` outside the loop, as recommended by eslintMichael Howell-3/+3
2021-03-15Run tests in nll modeOli Scherer-9/+106
2021-03-15Auto merge of #83121 - the8472:env-rwlock-2, r=joshtriplettbors-12/+72
use RWlock when accessing os::env (take 2) This reverts commit acdca316c3d42299d31c1b47eb792006ffdfc29c (#82877) i.e. redoes #81850 since the invalid unlock attempts in the child process have been fixed in #82949 r? `@joshtriplett`
2021-03-15Explain each variant of TAIT usage with examplesOli Scherer-1/+44
2021-03-15🍼 for tidyOli Scherer-3/+6
2021-03-15Only allow tait defining uses in function and method return positionOli Scherer-113/+384
2021-03-15No background for code in portability snippetsSimonas Kazlauskas-9/+3
This better matches the appearance of this kind of snippet in the full item view and is less jarring to read due to repeated foreground-background changes.
2021-03-15Special case type aliases from impl trait in const/static typesOli Scherer-6/+13
2021-03-15Add a test showing how `impl_trait_in_bindings` is a breaking changeOli Scherer-2/+58
2021-03-15Replace `type_alias_impl_trait` by `min_type_alias_impl_trait` with no ↵Oli Scherer-576/+4814
actual changes in behaviour This makes `type_alias_impl_trait` not actually do anything anymore
2021-03-15Fall-back to sans-serif if Arial is not availableSimonas Kazlauskas-4/+5
Otherwise on systems where Arial is not available the system will fallback to a serif font, rather than a sans-serif one. This is especially relevant on acessibility-conscious setups (such as is mine) that have web-fonts disabled and a limited set of fonts available on the system.
2021-03-15Delete non-revision ui test output file if revisions are usedOli Scherer-0/+7
2021-03-15Make regression test succeed as long as it ICEsOli Scherer-18/+15
2021-03-15Use tracing instrumentation for better bug diagnosingOli Scherer-8/+3
2021-03-15Add reproduction testOli Scherer-0/+47
2021-03-15Mark `extern_mod_stmt_cnum` as `eval_always`Aaron Hill-0/+2
This query reads from global untracked state, so it always needs to be evaluated.
2021-03-15Auto merge of #83149 - Dylan-DPC:rollup-ov70c5v, r=Dylan-DPCbors-174/+702
Rollup of 10 pull requests Successful merges: - #82989 (Custom error on literal names from other languages) - #83054 (Validate rustc_layout_scalar_valid_range_{start,end} attributes) - #83098 (Find more invalid doc attributes) - #83108 (Remove unused `opt_local_def_id_to_hir_id` function) - #83110 (Fix typos in `library/core/src/ptr/mod.rs` and `library/std/src/sys_common/thread_local_dtor.rs`) - #83113 (Minor refactoring in try_index_step) - #83127 (Introduce `proc_macro_back_compat` lint, and emit for `time-macros-impl`) - #83132 (Don't encode file information for span with a dummy location) - #83141 (:arrow_up: rust-analyzer) - #83144 (Introduce `rustc_interface::interface::Config::parse_sess_created` callback) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-03-15Rollup merge of #83144 - hyd-dev:parse-sess-created, r=oli-obkDylan DPC-13/+25
Introduce `rustc_interface::interface::Config::parse_sess_created` callback Resolves #82900. cc `@oli-obk`
2021-03-15Rollup merge of #83141 - lnicola:rust-analyzer-2021-03-15, r=jonas-schievinkDylan DPC-16/+16
:arrow_up: rust-analyzer
2021-03-15Rollup merge of #83132 - Aaron1011:fix/incr-cache-dummy, r=estebankDylan DPC-3/+29
Don't encode file information for span with a dummy location Fixes #83112 The location information for a dummy span isn't real, so don't encode it. This brings the incr comp cache code into line with the Span `StableHash` impl, which doesn't hash the location information for dummy spans. Previously, we would attempt to load the 'original' file from a dummy span - if the file id changed (e.g. due to being moved on disk), we would get an ICE, since the Span was still valid due to its hash being unchanged.
2021-03-15Rollup merge of #83127 - Aaron1011:time-macros-impl-warn, r=petrochenkovDylan DPC-65/+206
Introduce `proc_macro_back_compat` lint, and emit for `time-macros-impl` Now that future-incompat-report support has landed in nightly Cargo, we can start to make progress towards removing the various proc-macro back-compat hacks that have accumulated in the compiler. This PR introduces a new lint `proc_macro_back_compat`, which results in a future-incompat-report entry being generated. All proc-macro back-compat warnings will be grouped under this lint. Note that this lint will never actually become a hard error - instead, we will remove the special cases for various macros, which will cause older versions of those crates to emit some other error. I've added code to fire this lint for the `time-macros-impl` case. This is the easiest case out of all of our current back-compat hacks - the crate was renamed to `time-macros`, so seeing a filename with `time-macros-impl` guarantees that an older version of the parent `time` crate is in use. When Cargo's future-incompat-report feature gets stabilized, affected users will start to see future-incompat warnings when they build their crates.
2021-03-15Rollup merge of #83113 - osa1:refactor_try_index_step, r=jonas-schievinkDylan DPC-9/+5
Minor refactoring in try_index_step Merges `if-let` and `if x.is_some() { ... }` blocks
2021-03-15Rollup merge of #83110 - hyksm:fix-typo, r=jonas-schievinkDylan DPC-2/+2
Fix typos in `library/core/src/ptr/mod.rs` and `library/std/src/sys_common/thread_local_dtor.rs` adress -> address
2021-03-15Rollup merge of #83108 - jyn514:remove-unused, r=estebankDylan DPC-10/+0
Remove unused `opt_local_def_id_to_hir_id` function Found while investigating #82933 - all LocalDefIds are expected to have HirIds, there's no point in pretending otherwise.
2021-03-15Rollup merge of #83098 - camelid:more-doc-attr-check, r=davidtwcoDylan DPC-55/+195
Find more invalid doc attributes - Lint on `#[doc(123)]`, `#[doc("hello")]`, etc. - Lint every attribute; e.g., will now report two warnings for `#[doc(foo, bar)]` - Add hyphen to "crate level" - Display paths like `#[doc(foo::bar)]` correctly instead of as an empty string
2021-03-15Rollup merge of #83054 - tmiasko:rustc_layout_scalar_valid_range, r=davidtwcoDylan DPC-1/+91
Validate rustc_layout_scalar_valid_range_{start,end} attributes Fixes #82251, fixes #82981.
2021-03-15Rollup merge of #82989 - Smittyvb:other-lang-literal-errors, r=varkorDylan DPC-0/+133
Custom error on literal names from other languages This detects all Java literal types and all single word C data types, and suggests the corresponding Rust literal type.