forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rest: New attribute parsing #5
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
955ec6a
to
eb7d725
Compare
c73feca
to
458f1d0
Compare
This was referenced Dec 14, 2024
09d949d
to
efb98b6
Compare
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#129259 (Add inherent versions of MaybeUninit methods for slices) - rust-lang#135374 (Suggest typo fix when trait path expression is typo'ed) - rust-lang#135377 (Make MIR cleanup for functions with impossible predicates into a real MIR pass) - rust-lang#135378 (Remove a bunch of diagnostic stashing that doesn't do anything) - rust-lang#135397 (compiletest: add erroneous variant to `string_enum`s conversions error) - rust-lang#135398 (add more crash tests) r? `@ghost` `@rustbot` modify labels: rollup
centralize build stamp logic This PR brings all the stamp file handling into one place inside `build_stamp` module, which takes care of everything related to build stamps. By doing this, we cut down on duplicated code and types and keep the codebase easier to maintain and more consistent. Main goals are: - Make stamp handling stricter so we don't have to pass `Path`s around and manually `join` on arbitrary directories - Keep all stamp-related logic in one place - Make it easier to test and debug - Avoid duplication - Keep things simple and well-documented Resolves rust-lang#134962
…2_11 Sync from rust 2024/12/11
…oboet Add #[inline] to copy_from_slice I'm doing cooked things to CGU partitioning for compiler-builtins (rust-lang#135395) and this was the lone symbol in my compiler-builtins rlib that wasn't an intrinsic. Adding `#[inline]` makes it go away. Perf report indicates a marginal but chaotic effect on compile time, marginal improvement in codegen. As expected.
…uillaumeGomez rustdoc-json: Include items in stripped modules in `Crate::paths`. Closes rust-lang#135309 When we're running rustdoc-json, we should err on the side of adding more items to `Cache::paths`, as that directly becomes `Crate::paths` in the output. r? ``@GuillaumeGomez.`` Best reviewed commit-by-commit.
Update the explanation for why we use box_new in vec! The perf run in this PR demonstrates that there is no longer a dramatic change in compile time with the intrinsic `box_new` vs calling `Box::new`, but I've locally confirmed that there is still a dramatic change in stack use.
…rors De-abstract tagged ptr and make it covariant In rust-lang#135272 I needed to use a tagged ptr in `hir::TyKind` in order to not regress hir type sizes. Unfortunately the existing `CopyTaggedPtr` abstraction is insufficient as it makes the `'hir` lifetime invariant. I spent some time trying to keep existing functionality while making it covariant but in the end I realised that actually we dont use *any* of this code *anywhere* in rustc, so I've just removed everything and replaced it with a much less general abstraction that is suitable for what I need in rust-lang#135272. Idk if anyone has a preference for just keeping all the abstractions here in case anyone needs them in the future 🤷♀️
Remove some empty expected files to fix blessing rust-lang#134808 made --bless remove empty expected files. Remove some empty files that were causing noise in unrelated `--bless` invocations.
…s, r=compiler-errors Update unstable lint docs to include required feature attributes closes rust-lang#135298 ## Summary This PR updates the documentation examples for the following unstable lints to ensure they include the necessary feature attributes for proper usage: - fuzzy_provenance_casts - lossy_provenance_casts - unqualified_local_imports - test_unstable_lint ## Changes Made: - Added the appropriate #![feature(...)] attributes to the example code for each lint. - Updated the examples to produce correct and meaningful warnings, ensuring they align with current lint behavior. Reference: - Used the `must_not_suspend` lint documentation as a template for these updates.
…er-errors Deny various clippy lints Almost all of these clippy lints have zero occurrences. Two of them have one each, and this PR fixes those.
…ouxu run_make_support: add `#![warn(unreachable_pub)]` This PR enables the [`unreachable_pub`](https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html#unreachable-pub) lint as warn in the `run_make_support` crate. Related to rust-lang/compiler-team#773 r? ``@jieyouxu``
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#134754 (Implement `use` associated items of traits) - rust-lang#135481 (coverage: Completely overhaul counter assignment, using node-flow graphs) - rust-lang#135504 (Allow coercing safe-to-call target_feature functions to safe fn pointers) - rust-lang#135561 (Update docs for `-Clink-dead-code` to discourage its use) - rust-lang#135574 (ci: mirror ubuntu:22.04 to ghcr.io) - rust-lang#135585 (resolve symlinks of LLVM tool binaries before copying them) - rust-lang#135588 (Add license-metadata.json to rustc-src tarball.) r? `@ghost` `@rustbot` modify labels: rollup
…js, r=clubby789 bootstrap: still require `COMPILETEST_FORCE_STAGE0` for `./x test rustdoc-js --stage 0` This PR reverts rust-lang#135375, because through some more testing I found out `./x test rustdoc-js --stage 0` does not in fact build rustdoc, and all the tests fail. This can't be intended behavior, so at least require `COMPILETEST_FORCE_STAGE0` to make it less likely to run `rustdoc-js --stage 0` by accident. The problem that `--stage 0` is not working at all for this rustdoc-js test suite is tracked over at rust-lang#135603. cc `@lolbinarycat` r? bootstrap
…ubilee Add gpu-kernel calling convention The amdgpu-kernel calling convention was reverted in commit f6b21e9 (rust-lang#120495 and rust-lang/rust-analyzer#16463) due to inactivity in the amdgpu target. Introduce a `gpu-kernel` calling convention that translates to `ptx_kernel` or `amdgpu_kernel`, depending on the target that rust compiles for. Tracking issue: rust-lang#135467 amdgpu target tracking issue: rust-lang#135024
…-func, r=notriddle Treat other items as functions for the purpose of type-based search specifically, constants and statics are nullary functions, and struct fields are unary functions. fixes rust-lang#130204 r? ``@notriddle``
…kh726 Location-sensitive polonius prototype: endgame This PR sets up the naive location-sensitive analysis end-to-end, and replaces the location-insensitive analysis. It's roughly all the in-progress work I wanted to land for the prototype, modulo cleanups I still want to do after the holidays, or the polonius debugger, and so on. Here, we traverse the localized constraint graph, have to deal with kills and time-traveling (👌), and record that as loan liveness for the existing scope and active loans computations. Then the near future looks like this, especially if the 2025h1 project goal is accepted: - gradually bringing it up to completion - analyzing and fixing the few remaining test failures - going over the *numerous* fixmes in this prototype (one of which is similar to a hang on one test's millions and millions of constraints) - trying to see how to lower the impact of the lack of NLL liveness optimization on diagnostics, and their categorization of local variables and temporaries (the vast majority of blessed expectations differences), as well as the couple ICEs trying to find an NLL constraint to blame for errors. - dealing with the theoretical weakness around kills, conflating reachability for the two TCS, etc that is described ad nauseam in the code. - switching the compare mode to the in-tree implementation, and blessing the diagnostics - apart from the hang, it's not catastrophically slower on our test suite, so then we can try to enable it on CI - checking crater, maybe trying to make it faster :3, etc. I've tried to gradually introduce this PR's work over 4 commits, because it's kind of subtle/annoying, and Niko/I are not completely convinced yet. That one comment explaining the situation is maybe 30% of the PR 😓. Who knew that spacetime reachability and time-traveling could be mind bending. I kinda found this late and the impact on this part of the computation was a bit unexpected to us. A bit more care/thought will be needed here. I've described my plan in the comments though. In any case, I believe we have the current implementation is a conservative approximation that shouldn't result in unsoundness but false positives at worst. So it feels fine for now. r? ``@jackh726`` --- Fixes rust-lang#127628 -- which was a assertion triggered for a difference in loan computation between NLLs and the location-insensitive analysis. That doesn't exist anymore so I've removed this crash test.
Detect if-else chains with a missing final else in type errors ``` error[E0308]: `if` and `else` have incompatible types --> $DIR/if-else-chain-missing-else.rs:12:12 | LL | let x = if let Ok(x) = res { | ______________- LL | | x | | - expected because of this LL | | } else if let Err(e) = res { | | ____________^ LL | || return Err(e); LL | || }; | || ^ | ||_____| | |_____`if` and `else` have incompatible types | expected `i32`, found `()` | = note: `if` expressions without `else` evaluate to `()` = note: consider adding an `else` block that evaluates to the expected type ``` We probably want a longer explanation and fewer spans on this case. Partially address rust-lang#133316.
…, r=notriddle fix error for when results in a rustdoc-js test are in the wrong order see rust-lang#131806 (comment)
…=jieyouxu Fix suggestion to convert dereference of raw pointer to ref Fix rust-lang#135580
Expand docs for `E0207` with additional example Add an example to E0207 docs showing how to tie the lifetime of the self type to an associated type in an impl when the trait *doesn't* have a lifetime to begin with. CC rust-lang#135589.
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#131806 (Treat other items as functions for the purpose of type-based search) - rust-lang#134980 (Location-sensitive polonius prototype: endgame) - rust-lang#135558 (Detect if-else chains with a missing final else in type errors) - rust-lang#135594 (fix error for when results in a rustdoc-js test are in the wrong order) - rust-lang#135601 (Fix suggestion to convert dereference of raw pointer to ref) - rust-lang#135604 (Expand docs for `E0207` with additional example) r? `@ghost` `@rustbot` modify labels: rollup
…oss35 use indirect return for `i128` and `f128` on wasm32 fixes rust-lang#135532 Based on https://github.com/WebAssembly/tool-conventions/blob/main/BasicCABI.md we now use an indirect return for `i128`, `u128` and `f128`. That is what LLVM ended up doing anyway. r? `@bjorn3`
Stable Hash: Ignore all HirIds that just identify the node itself This should provide better incremental caching, but it seems there is more to it. These IDs also serve no purpose being in the stable hash of the item they refer to, only when referring to *another* item is it important that we hash the `HirId`. So we can at least avoid the cost during stable hashing, even if we don't benefit from it by avoiding some queries' caches from being invalidated Unsure how to make sure we do this right by construction. Would be nice to do something type based
…rrors add cache to `AmbiguityCausesVisitor` fixes rust-lang#135457, alternative to rust-lang#135524. cc https://rust-lang.zulipchat.com/#narrow/channel/364551-t-types.2Ftrait-system-refactor/topic/new-solver.20hang.20.23135457 r? `@compiler-errors`
This advances Fuchsia to a checkout from 2025-01-13, which corresponds to a recent Rust roll, and hopefully avoids rust-lang#135667, where a repository used by the older version of Rust was accidentally archived and broke checking out the prior version. try-job: x86_64-fuchsia
Bump Fuchsia integration commit This advances Fuchsia to a checkout from 2025-01-13, which corresponds to a recent Rust roll, and hopefully avoids rust-lang#135667, where a repository used by the older version of Rust was accidentally archived and broke checking out the prior version. try-job: x86_64-fuchsia cc `@ehuss`
New attribute parsing
458f1d0
to
053b11b
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.