diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2021-12-10 22:40:32 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-10 22:40:32 +0100 |
| commit | d317da48b1341eec28ed070002a7110b39b9ae15 (patch) | |
| tree | 65f021f374e4c2015a9f4ec5dc4ffc6e0c242e69 /compiler/rustc_codegen_llvm/src | |
| parent | 60aa03aa71e6057bded100d24519e6309c2152d6 (diff) | |
| parent | 85558ad5b39d435d3c57e3e0df5f4c160ee0c6e3 (diff) | |
| download | rust-d317da48b1341eec28ed070002a7110b39b9ae15.tar.gz rust-d317da48b1341eec28ed070002a7110b39b9ae15.zip | |
Rollup merge of #91325 - RalfJung:const_eval_select, r=dtolnay
adjust const_eval_select documentation "The Rust compiler assumes" indicates that this is language UB, but [I don't think that is a good idea](https://rust-lang.zulipchat.com/#narrow/stream/146212-t-compiler.2Fconst-eval/topic/const_eval_select.20assumptions). This UB would be very hard to test for and looks like a way-too-big footgun. ``@oli-obk`` suggested this is meant to be more like "library UB", so I tried to adjust the docs accordingly. I also removed all references to "referential transparency". That is a rather vague concept used to mean many different things, and I honestly have no idea what exactly is meant by it in this specific instance. But I assume ``@fee1-dead`` had in their mind a property that all `const fn` code upholds, so by demanding that the runtime code and the const-time code are *observably equivalent*, whatever that property is would also be enforced here. Cc ``@rust-lang/wg-const-eval``
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
