-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Add an ErrorGuaranteed to ast::TyKind::Err (attempt 2) #121109
Conversation
Some changes occurred in src/tools/rustfmt cc @rust-lang/rustfmt Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
This is a do-over for #121072, but removing the bit about cc @fmease @ShE3py, because this will conflict a little with #120586, but in a good way, i.e. ultimately reducing the use of delayed bugs :) |
This comment has been minimized.
This comment has been minimized.
This makes it more like `hir::TyKind::Err`, and avoids a `span_delayed_bug` call in `LoweringContext::lower_ty_direct`. It also requires adding `ast::TyKind::Dummy`, now that `ast::TyKind::Err` can't be used for that purpose in the absence of an error emission. There are a couple of cases that aren't as neat as I would have liked, marked with `FIXME` comments.
00345ad
to
5233bc9
Compare
I have added Right now my gut feeling is that the whole notion of dummy values is inherently suspect, and I wonder if we can remove them, e.g. by using |
@bors r+ |
…ease Add `ErrorGuaranteed` to `ast::LitKind::Err`, `token::LitKind::Err`. Similar to recent work doing the same for `ExprKind::Err` (rust-lang#120586) and `TyKind::Err` (rust-lang#121109). r? `@oli-obk`
@bors rollup |
Rollup merge of rust-lang#121120 - nnethercote:LitKind-Err-guar, r=fmease Add `ErrorGuaranteed` to `ast::LitKind::Err`, `token::LitKind::Err`. Similar to recent work doing the same for `ExprKind::Err` (rust-lang#120586) and `TyKind::Err` (rust-lang#121109). r? `@oli-obk`
…li-obk Add an ErrorGuaranteed to ast::TyKind::Err (attempt 2) This makes it more like `hir::TyKind::Err`, and avoids a `has_errors` assertion in `LoweringContext::lower_ty_direct`. r? `@oli-obk`
…li-obk Add an ErrorGuaranteed to ast::TyKind::Err (attempt 2) This makes it more like `hir::TyKind::Err`, and avoids a `has_errors` assertion in `LoweringContext::lower_ty_direct`. r? ``@oli-obk``
…llaumeGomez Rollup of 13 pull requests Successful merges: - rust-lang#118264 (Optimize `VecDeque::drain` for (half-)open ranges) - rust-lang#120741 (Make `io::BorrowedCursor::advance` safe) - rust-lang#120777 (Bump Unicode to version 15.1.0, regenerate tables) - rust-lang#120971 (Fix comment in core/src/str/validations.rs) - rust-lang#121034 (Improve wording of `static_mut_ref`) - rust-lang#121095 (Add extra indent spaces for rust-playground link) - rust-lang#121109 (Add an ErrorGuaranteed to ast::TyKind::Err (attempt 2)) - rust-lang#121119 (Make `async Fn` trait kind errors better) - rust-lang#121141 (Fix closure kind docs) - rust-lang#121145 (Update aarch64 target feature docs to match LLVM) - rust-lang#121146 (Only point out non-diverging arms for match suggestions) - rust-lang#121147 (Avoid debug logging entire MIR body) - rust-lang#121155 (doc: add note about panicking examples for strict_overflow_ops) r? `@ghost` `@rustbot` modify labels: rollup
…llaumeGomez Rollup of 10 pull requests Successful merges: - rust-lang#120777 (Bump Unicode to version 15.1.0, regenerate tables) - rust-lang#120971 (Fix comment in core/src/str/validations.rs) - rust-lang#121095 (Add extra indent spaces for rust-playground link) - rust-lang#121109 (Add an ErrorGuaranteed to ast::TyKind::Err (attempt 2)) - rust-lang#121119 (Make `async Fn` trait kind errors better) - rust-lang#121141 (Fix closure kind docs) - rust-lang#121145 (Update aarch64 target feature docs to match LLVM) - rust-lang#121146 (Only point out non-diverging arms for match suggestions) - rust-lang#121147 (Avoid debug logging entire MIR body) - rust-lang#121155 (doc: add note about panicking examples for strict_overflow_ops) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#121109 - nnethercote:TyKind-Err-guar-2, r=oli-obk Add an ErrorGuaranteed to ast::TyKind::Err (attempt 2) This makes it more like `hir::TyKind::Err`, and avoids a `has_errors` assertion in `LoweringContext::lower_ty_direct`. r? ```@oli-obk```
…ease Add `ErrorGuaranteed` to `ast::LitKind::Err`, `token::LitKind::Err`. Similar to recent work doing the same for `ExprKind::Err` (rust-lang#120586) and `TyKind::Err` (rust-lang#121109). r? `@oli-obk`
…li-obk Add an ErrorGuaranteed to ast::TyKind::Err (attempt 2) This makes it more like `hir::TyKind::Err`, and avoids a `has_errors` assertion in `LoweringContext::lower_ty_direct`. r? ```@oli-obk```
This makes it more like
hir::TyKind::Err
, and avoids ahas_errors
assertion inLoweringContext::lower_ty_direct
.r? @oli-obk