Go to file
Matthias Krüger db9591cfb6
Rollup merge of #118882 - compiler-errors:normalized-sig-wf, r=lcnr
Check normalized call signature for WF in mir typeck

Unfortunately we don't check that the built-in implementations for `Fn*` traits are actually well-formed in the same way that we do for user-provided impls.

Essentially, when checking a call terminator, we end up with a signature that references an unnormalized `<[closure] as FnOnce<...>>::Output` in its output. That output type, due to the built-in impl, doesn't follow the expected rule that `WF(ty)` implies `WF(normalized(ty))`. We fix this by also checking the normalized signature here.

**See** boxy's detailed and useful explanation comment which explains this in more detail: https://github.com/rust-lang/rust/issues/114936#issuecomment-1710388741

Fixes #114936
Fixes #118876

r? types
cc ``@BoxyUwU`` ``@lcnr``
2024-02-13 22:51:53 +01:00
.github Downgrade Xcode from the default (15.0) to 14.3.1. 2024-02-10 20:59:20 -08:00
.reuse Rollup merge of #119189 - henrispriet:move-installing-from-source, r=Mark-Simulacrum 2024-01-13 22:35:08 +01:00
compiler Rollup merge of #118882 - compiler-errors:normalized-sig-wf, r=lcnr 2024-02-13 22:51:53 +01:00
library Auto merge of #121003 - matthiaskrgr:rollup-u5wyztn, r=matthiaskrgr 2024-02-13 07:19:39 +00:00
LICENSES
src Auto merge of #121036 - matthiaskrgr:rollup-ul05q8e, r=matthiaskrgr 2024-02-13 17:27:25 +00:00
tests Rollup merge of #118882 - compiler-errors:normalized-sig-wf, r=lcnr 2024-02-13 22:51:53 +01:00
.editorconfig
.git-blame-ignore-revs
.gitattributes
.gitignore
.gitmodules Update to LLVM 18 2024-02-13 10:33:40 +01:00
.mailmap correct my mailmap entry 2024-01-21 20:47:26 -05:00
Cargo.lock Update compiler-builtins 2024-02-13 10:33:40 +01:00
Cargo.toml clippy: Enable str_to_string rule 2024-02-10 01:00:41 +09:00
CODE_OF_CONDUCT.md
config.example.toml add a new optimized_compiler_builtins option 2024-01-07 13:04:40 +03:00
configure
CONTRIBUTING.md
COPYRIGHT
INSTALL.md Move section "Installing from Source" to seperate file 2024-01-13 17:22:55 +01:00
LICENSE-APACHE
LICENSE-MIT
README.md Update Readme 2024-01-15 13:57:29 -08:00
RELEASES.md Remove duplicate release note 2024-02-09 12:31:32 -05:00
rust-bors.toml
rustfmt.toml rustfmt.toml: don't ignore just any tests path, only root one 2024-01-11 14:59:59 +03:00
triagebot.toml Rollup merge of #120962 - ChrisDenton:review, r=Nilstrieb 2024-02-12 18:04:11 +01:00
x
x.ps1
x.py

The Rust Programming Language

Rust Community

This is the main source code repository for Rust. It contains the compiler, standard library, and documentation.

Note: this README is for users rather than contributors. If you wish to contribute to the compiler, you should read CONTRIBUTING.md instead.

Table of Contents

Quick Start

Read "Installation" from The Book.

Installing from Source

If you really want to install from source (though this is not recommended), see INSTALL.md.

Getting Help

See https://www.rust-lang.org/community for a list of chat platforms and forums.

Contributing

See CONTRIBUTING.md.

License

Rust is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0), with portions covered by various BSD-like licenses.

See LICENSE-APACHE, LICENSE-MIT, and COPYRIGHT for details.

Trademark

The Rust Foundation owns and protects the Rust and Cargo trademarks and logos (the "Rust Trademarks").

If you want to use these names or brands, please read the media guide.

Third-party logos may be subject to third-party copyrights and trademarks. See Licenses for details.