Comments (5)
Caused by running the interpreter on code that doesn't even pass name resolution. Not sure where to fix this, but probably not in the interpreter.^^
Cc @oli-obk
from rust.
from rust.
this is a promoted failing to compile because it gets the layout of this broken type, which gives us back an ErrorGuaranteed
. I'm certain we can prevent const eval from running by checking such layouts earlier in the MIR pipeline, but the fix isn't clear to me yet.
from rust.
The issue is that in the sanity check here we only know it's an ErrorHandled::Reported
, we don't know whether it was a typeck error on a const-eval error. So we can't really distinguish these cases.
If this is a LayoutError::ReferencesError
, we could probably fix it by tweaking the error handling here. But there probably are similar cases where a promoted fails to evaluate due to a SizeOverflow and then we have to report the error somewhere.
The only option I see right now is to add another variant to ErrorHandled
(or a flag in ErrorHandled::Reported
) to track whether this was a failure inside the constant itself or a failure in something the constant referenced. But this distinction isn't always very clear anyway... it would basically have to be "is this an error that can occur even for supposedly infallible operations like &[]
", i.e., match exactly the usecase of the const-eval / promoted sanity check. Which is not great.
from rust.
We already got the tainted_by_errors
flag that we can reuse for that
from rust.
Related Issues (20)
- Unexpected cfgs warns on quite-intentional user-cfgs HOT 9
- android: stdlib stack overflow handlers are not installed
- LLVM 19 changes debuginfo text representation breaking at least 4 tests HOT 1
- Regression: Cannot build the compiler for aarch64-apple-tvos-sim using Rust 1.78.0 HOT 4
- Documentation: sorting impls for structs: first crate's own impls, then std impls HOT 1
- ICE : `Region parameter out of range` when instantiating in region HOT 1
- ICE: coherence: `did not expect successful goal when collecting ambiguity errors` HOT 3
- Strange Compiler Bug HOT 1
- Trivial program depending on the "boring" crate fails to link with current stable Rust (1.78) on Windows HOT 3
- Documentation differ when Rust is build on i386 Solaris vs SPARC Solaris HOT 1
- ICE: coherence: `did not expect selection error when collecting ambiguity errors` HOT 1
- ICE: `should be sized but is not?` HOT 2
- Cargo check also checks path depencies HOT 7
- Tracking Issue for Rust 2024: Rustdoc tests in one binary HOT 3
- Some items in std doc lead to nowhere HOT 2
- ICE: coherence: `tried to combine ConstKind::Infer/ConstKind::Infer(InferConst::Var)` HOT 3
- flag to dump proc-macro's generated tokenstream to file for debugging HOT 2
- Possible miscompile introduced in nightly 2024-05-04 HOT 3
- False positive in `keyword_idents_2024` HOT 7
- Add lint on reference-to-pointer transmutes HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust.