- 18 5月, 2021 12 次提交
-
-
由 Joshua Nelson 提交于
This also gives a better error message when a span is missing.
-
由 Alexis Bourget 提交于
This adds a new lint to `rustc` that is used in rustdoc when a code block is empty or cannot be parsed as valid Rust code. Previously this was unconditionally a warning. As such some documentation comments were (unknowingly) abusing this to pass despite the `-Dwarnings` used when compiling `rustc`, this should not be the case anymore.
-
由 bors 提交于
Rollup of 8 pull requests Successful merges: - #85087 (`eval_fn_call`: check the ABI of `body.source`) - #85302 (Expand WASI abbreviation in docs) - #85355 (More tests for issue-85255) - #85367 (Fix invalid input:disabled CSS selector) - #85374 (mark internal inplace_iteration traits as hidden) - #85408 (remove size field from Allocation) - #85409 (Simplify `cfg(any(unix, target_os="redox"))` in example to just `cfg(unix)`) - #85412 (remove some functions that were only used by Miri) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 Ralf Jung 提交于
remove some functions that were only used by Miri and Miri does not need them any more with https://github.com/rust-lang/miri/pull/1805. r? ``@oli-obk``
-
由 Ralf Jung 提交于
Simplify `cfg(any(unix, target_os="redox"))` in example to just `cfg(unix)` Update example for `OsString` that handled `redox` seperately from `unix`: Redox has been completely integrated under `target_family="unix"`, so `cfg(unix)` implies `target_os="redox"` https://github.com/rust-lang/rust/blob/35dbef235048f9a2939dc20effe083ca483c37ff/compiler/rustc_target/src/spec/redox_base.rs#L26
-
由 Ralf Jung 提交于
remove size field from Allocation This is a part of https://github.com/rust-lang/rust/pull/85376 that can be easily split out. r? ``@oli-obk``
-
由 Ralf Jung 提交于
mark internal inplace_iteration traits as hidden resolves #85373 r? ``@SimonSapin``
-
由 Ralf Jung 提交于
Fix invalid input:disabled CSS selector For some reason, we used "search-focus" instead of "search-input"... r? ``@jsha``
-
由 Ralf Jung 提交于
More tests for issue-85255 Add more test for `pub(crate)`. r? ``@varkor``
-
由 Ralf Jung 提交于
Expand WASI abbreviation in docs I was pretty sure this was related to something for WebAssembly but wasn't 100% sure so I checked but even on these top-level docs I couldn't find the abbreviation expanded. I'm normally used to Rust docs being detailed and explanatory and writing abbreviations like this out in full at least once so I thought it was worth the change. Feel free to close this if it's too much.
-
由 Ralf Jung 提交于
`eval_fn_call`: check the ABI of `body.source` And stop checking `instance_ty.fn_sig(*self.tcx).abi()`, if the function is not an intrinsic. Addresses https://github.com/rust-lang/miri/pull/1776#discussion_r615381169. No idea how to test this without Miri...
-
由 bors 提交于
Update RLS Contains https://github.com/rust-lang/rls/pull/1736. With #82208 merged, this should now close https://github.com/rust-lang/rust/issues/85225. Tested locally with `./x.py test src/tools/rls` and seems to be working as expected. I noticed the rustfmt merge didn't trigger toolstate upgrade (because we pruned most but not all of the related machinery?), so I'd rather get this rubber-stamped by someone more knowledgeable with infra/the merged changes in case I missed something and need to include something else here to unbreak the RLS toolstate. r? `@Mark-Simulacrum`
-
- 17 5月, 2021 16 次提交
-
-
由 hyd-dev 提交于
-
由 Ralf Jung 提交于
-
由 bors 提交于
Parse unnamed fields of struct and union type Added the `unnamed_fields` feature gate. This is a prototype of [RFC 2102](https://github.com/rust-lang/rust/issues/49804), so any suggestions are greatly appreciated. r? `@petrochenkov`
-
由 Christiaan Dirkx 提交于
-
由 Ralf Jung 提交于
-
由 Ralf Jung 提交于
-
由 bors 提交于
Allow `async {}` expressions in const contexts Gated behind a new `const_async_blocks` feature.
-
由 jedel1043 提交于
-
由 bors 提交于
Remove CrateNum parameter for queries that only work on local crate The pervasive `CrateNum` parameter is a remnant of the multi-crate rustc idea. Using `()` as query key in those cases avoids having to worry about the validity of the query key.
-
由 bors 提交于
rustc_codegen_ssa: only create backend `BasicBlock`s as-needed. Instead of creating one backend (e.g. LLVM) block per MIR block ahead of time, and then deleting the ones that weren't visited, this PR moves to creating the blocks as they're needed (either reached via the RPO visit, or used as the target of a branch from a different block). As deleting a block was the only `unsafe` builder method (generally we only *create* backend objects, not *remove* them), that's gone now and codegen is overall a bit safer. The only change in output is the order of LLVM blocks (which AFAIK has no semantic meaning, other than the first block being the entry block). This happens because the blocks are now created due to control-flow edges, rather than MIR block order. I'm making this a standalone PR because I keep getting wild perf results when I change *anything* in codegen, but if you want to read more about my plans in this area, see https://github.com/rust-lang/rust/pull/84771#issuecomment-830636256 (and https://github.com/rust-lang/rust/pull/84771#issue-628295651 - but that may be a bit outdated). (You may notice some of the APIs in this PR, like `append_block`, don't help with the future plans - but I didn't want to include the necessary refactors that pass a build around everywhere, in this PR, so it's a small compromise) r? `@nagisa` `@bjorn3`
-
由 Eduard-Mihai Burtescu 提交于
-
由 Eduard-Mihai Burtescu 提交于
-
由 bors 提交于
Fix unused attributes on macro_rules. The `unused_attributes` lint wasn't firing on attributes of `macro_rules` definitions. The consequence is that many attributes are silently ignored on `macro_rules`. The reason is that `unused_attributes` is a late-lint pass, and only has access to the HIR, which does not have macro_rules definitions. My solution here is to change `non_exported_macro_attrs` to be `macro_attrs` (a list of all attributes used for `macro_rules`, instead of just those for `macro_export`), and then to check this list in the `unused_attributes` lint. There are a number of alternate approaches, but this seemed the most reliable and least invasive. I am open to completely different approaches, though. One concern is that I don't fully understand the implications of extending `non_exported_macro_attrs` to include non-exported macros. That list was originally added in #62042 to handle stability attributes, so I suspect it was just an optimization since that was all that was needed. It was later extended to be included in SVH in #83901. #80641 also added a use to check for `invalid` attributes, which seems a little odd to me (it didn't validate non-exported macros, and seems highly specific). Overall, there doesn't seem to be a clear story of when `unused_attributes` should be used versus an error like E0518. I considered alternatively using an "allow list" of built-in attributes that can be used on macro_rules (allow, warn, deny, forbid, cfg, cfg_attr, macro_export, deprecated, doc), but I feel like that could be a pain to maintain. Some built-in attributes already present hard-errors when used with macro_rules. These are each hard-coded in various places: - `derive` - `test` and `bench` - `proc_macro` and `proc_macro_derive` - `inline` - `global_allocator` The primary motivation is that I sometimes see people use `#[macro_use]` in front of `macro_rules`, which indicates there is some confusion out there (evident that there was even a case of it in rustc).
-
由 Jonas Schievink 提交于
-
由 bors 提交于
Remove support for floating-point constants in asm! Floating-point constants aren't very useful anyways and this simplifies the code since the type check can now be done in typeck. cc `@rust-lang/wg-inline-asm` r? `@nagisa`
-
由 The8472 提交于
-
- 16 5月, 2021 12 次提交
-
-
由 bors 提交于
Reachable statics have reachable initializers Static initializer can read other statics. Initializers are evaluated at compile time, and so their content could become inlined into another crate. Ensure that initializers of reachable statics are also reachable. Previously, when an item incorrectly considered to be unreachable was reached from another crate an attempt would be made to codegen it. The attempt could fail with an ICE (in the case MIR wasn't available to do so) in some circumstances the attempt could also succeed resulting in a local codegen of non-local items, including static ones. Fixes #84455.
-
由 jedel1043 提交于
-
由 jedel1043 提交于
-
由 jedel1043 提交于
Add unnamed_fields feature gate and gate unnamed fields on parsing
-
由 Guillaume Gomez 提交于
-
由 bors 提交于
rustc_codegen_ssa: generate MSVC cleanup pads on demand, like GNU landing pads. This unblocks #84993 in terms of codegen tests, as it brings the MSVC-style (`cleanup_pad`) EH (LLVM) block order in line with the GNU-style (`landing_pad`) EH (LLVM) block order, by having both of them be on-demand (instead of MSVC-style being eager and GNU-style lazy/on-demand). It also unifies the two implementations a bit, similar to #84699, but in the opposite direction (as that attempt made both kinds of EH pads eagerly built). ~~Opening as draft because I haven't done enough Windows testing just yet, of both this PR, and of #84993 rebased on it.~~ (**EDIT**: seems to be working as expected) r? `@nagisa`
-
由 bors 提交于
CTFE validation: handle pointers in str I also finally learned how I can match *some* NOTEs in a ui test without matching all of them, and applied that to some const tests in the 2nd commit where I added NOTE because I did not know what I was doing. I can separate this into its own PR if you prefer. Fixes https://github.com/rust-lang/rust/issues/83182 r? `@oli-obk`
-
由 bors 提交于
rustdoc: Call `initSidebarItems` in root module of crate r? `@jsha` Resolves #85301
-
由 bors 提交于
Add asm!() support for PowerPC64 I was anticipating this to be difficult so I didn't do it as part of #84732... but this was pretty easy to do
👀 -
由 Amanieu d'Antras 提交于
-
由 hi-rustin 提交于
-
由 bors 提交于
Check for inline assembly in THIR unsafeck #83129 was merged recently and added a THIR unsafe checker. This adds a check for inline assembly. (and this is 2x simpler than the MIR version, which has to check for `asm` and `llvm_asm` in two separate spots!) see also rust-lang/project-thir-unsafeck#7
-