f93aaf84cb
Some more pattern cleanup and bugfixing The next part of https://github.com/rust-lang/rust/pull/34095 The most significant fixed mistake is definitions for partially resolved associated types not being updated after full resolution. ``` fn f<T: Fn()>(arg: T::Output) { .... } // <- the definition of T::Output was not updated in def_map ``` For this reason unstable associated types of stable traits, like `FnOnce::Output`, could be used in stable code when written in unqualified form. Now they are properly checked, this is a **[breaking-change]** (pretty minor one, but a crater run would be nice). The fix is not to use unstable library features in stable code, alternatively `FnOnce::Output` can be stabilized. Besides that, paths in struct patterns and expressions `S::A { .. }` are now fully resolved as associated types. Such types cannot be identified as structs at the moment, i.e. the change doesn't make previously invalid code valid, but it improves error diagnostics. Other changes: `Def::Err` is supported better (less chances for ICEs for erroneous code), some incorrect error messages are corrected, some duplicated error messages are not reported, ADT definitions are now available through constructor IDs, everything else is cleanup and code audit. Fixes https://github.com/rust-lang/rust/issues/34209 Closes https://github.com/rust-lang/rust/issues/22933 (adds tests) r? @eddyb |
||
---|---|---|
.. | ||
codegen | ||
codegen-units | ||
compile-fail | ||
compile-fail-fulldeps | ||
debuginfo | ||
incremental | ||
parse-fail | ||
pretty | ||
run-fail | ||
run-fail-fulldeps | ||
run-make | ||
run-pass | ||
run-pass-fulldeps | ||
run-pass-valgrind | ||
rustdoc | ||
ui |