5a618129b8
I tried a couple of different ways to squash this, and still don't think this is ideal, but I wanted to get it out for feedback. Closes #5900 Closes #9942 There are a few scenarios where the compiler tries to evaluate CastExprs without the corresponding types being available yet in the type context: https://github.com/mozilla/rust/issues/10618, https://github.com/mozilla/rust/issues/5900, https://github.com/mozilla/rust/issues/9942 This PR takes the approach of having eval_const_expr_partial's CastExpr arm fall back to a limited ast_ty_to_ty call that only checks for (a subset of) valid const types, when the direct type lookup fails. It's kind of hacky, so I understand if you don't want to take this as is. I'd need a little mentoring to get this into better shape, as figuring out the proper fix has been a little daunting. I'm also happy if someone else wants to pick this up and run with it. This closes 5900 and 9942, but only moves the goalposts a little on 10618, which now falls over in a later phase of the compiler. |
||
---|---|---|
.. | ||
compiletest | ||
driver | ||
etc | ||
gyp@1e46da1000 | ||
libarena | ||
libextra | ||
libflate | ||
libglob | ||
libgreen | ||
libnative | ||
librustc | ||
librustdoc | ||
librustpkg | ||
librustuv | ||
libstd | ||
libsyntax | ||
libuv@fd5308383c | ||
llvm@e1dabb48f0 | ||
rt | ||
rustllvm | ||
test | ||
README.md | ||
snapshots.txt |
This is a preliminary version of the Rust compiler, libraries and tools.
Source layout:
Path | Description |
---|---|
librustc/ |
The self-hosted compiler |
libstd/ |
The standard library (imported and linked by default) |
libextra/ |
The "extras" library (slightly more peripheral code) |
libgreen/ |
The M:N runtime library |
libnative/ |
The 1:1 runtime library |
libsyntax/ |
The Rust parser and pretty-printer |
------------------- | --------------------------------------------------------- |
rt/ |
The runtime system |
rt/rust_*.c |
- Some of the runtime services |
rt/vg |
- Valgrind headers |
rt/msvc |
- MSVC support |
rt/sundown |
- The Markdown library used by rustdoc |
------------------- | --------------------------------------------------------- |
compiletest/ |
The test runner |
test/ |
Testsuite |
test/codegen |
- Tests for the LLVM IR infrastructure |
test/compile-fail |
- Tests that should fail to compile |
test/debug-info |
- Tests for the debuginfo tool |
test/run-fail |
- Tests that should compile, run and fail |
test/run-make |
- Tests that depend on a Makefile infrastructure |
test/run-pass |
- Tests that should compile, run and succeed |
test/bench |
- Benchmarks and miscellaneous |
test/pretty |
- Pretty-printer tests |
test/auxiliary |
- Dependencies of tests |
------------------- | --------------------------------------------------------- |
librustdoc/ |
The Rust API documentation tool |
librustpkg/ |
The package manager and build system |
libuv/ |
The libuv submodule |
------------------- | --------------------------------------------------------- |
llvm/ |
The LLVM submodule |
rustllvm/ |
LLVM support code |
------------------- | --------------------------------------------------------- |
etc/ |
Scripts, editors support, misc |