<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/test/ui/consts/rfc-2203-const-array-repeat-exprs, branch master</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=master</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2021-01-30T23:20:24+00:00</updated>
<entry>
<title>Remove const_in_array_rep_expr</title>
<updated>2021-01-30T23:20:24+00:00</updated>
<author>
<name>kadmin</name>
<email>julianknodt@gmail.com</email>
</author>
<published>2021-01-26T22:49:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6946534d84161353b56157f65f8cdcdfb93df749'/>
<id>urn:sha1:6946534d84161353b56157f65f8cdcdfb93df749</id>
<content type='text'>
</content>
</entry>
<entry>
<title>make sure [CONST; N] drops N times</title>
<updated>2020-12-20T14:15:29+00:00</updated>
<author>
<name>Ralf Jung</name>
<email>post@ralfj.de</email>
</author>
<published>2020-11-28T16:32:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=7f3e18cc2b24214e10df5434972f4f7cd461fa98'/>
<id>urn:sha1:7f3e18cc2b24214e10df5434972f4f7cd461fa98</id>
<content type='text'>
</content>
</entry>
<entry>
<title>add test that repeating non-Copy constants works</title>
<updated>2020-12-20T14:15:28+00:00</updated>
<author>
<name>Ralf Jung</name>
<email>post@ralfj.de</email>
</author>
<published>2020-11-21T17:05:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f8d4883dbebf71348abe1134c6f26d48a36256b9'/>
<id>urn:sha1:f8d4883dbebf71348abe1134c6f26d48a36256b9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>pretty: trim paths of unique symbols</title>
<updated>2020-09-02T19:26:37+00:00</updated>
<author>
<name>Dan Aloni</name>
<email>alonid@gmail.com</email>
</author>
<published>2020-09-02T07:40:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=07e7823c01be1733df2480de19fbbe6b8e9384cf'/>
<id>urn:sha1:07e7823c01be1733df2480de19fbbe6b8e9384cf</id>
<content type='text'>
If a symbol name can only be imported from one place for a type, and
as long as it was not glob-imported anywhere in the current crate, we
can trim its printed path and print only the name.

This has wide implications on error messages with types, for example,
shortening `std::vec::Vec` to just `Vec`, as long as there is no other
`Vec` importable anywhere.

This adds a new '-Z trim-diagnostic-paths=false' option to control this
feature.

On the good path, with no diagnosis printed, we should try to avoid
issuing this query, so we need to prevent trimmed_def_paths query on
several cases.

This change also relies on a previous commit that differentiates
between `Debug` and `Display` on various rustc types, where the latter
is trimmed and presented to the user and the former is not.
</content>
</entry>
<entry>
<title>Fix tests for RFC 2203 in a `const`</title>
<updated>2019-11-22T19:01:31+00:00</updated>
<author>
<name>Dylan MacKenzie</name>
<email>ecstaticmorse@gmail.com</email>
</author>
<published>2019-11-22T18:45:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=fcf4bee7d3d69356a9eb702f9e0a9ddba238d33f'/>
<id>urn:sha1:fcf4bee7d3d69356a9eb702f9e0a9ddba238d33f</id>
<content type='text'>
The previous test was incorrect. `const fn`s are *always* promotable
when inside a `const`, so it should pass. The error was caused by a bug
in `promote_consts`. I've added a failing test outside a `const`
alongside the existing one, which is now run-pass.
</content>
</entry>
<entry>
<title>tests: Add tests that use const fns.</title>
<updated>2019-07-07T19:23:31+00:00</updated>
<author>
<name>David Wood</name>
<email>david@davidtw.co</email>
</author>
<published>2019-06-13T16:30:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=4b1bc2ded91915e232c38cc503b5f110556cf719'/>
<id>urn:sha1:4b1bc2ded91915e232c38cc503b5f110556cf719</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tests: Update and add tests for RFC 2203.</title>
<updated>2019-07-07T19:23:28+00:00</updated>
<author>
<name>David Wood</name>
<email>david@davidtw.co</email>
</author>
<published>2019-06-12T07:46:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a655438988c5f7d100a5423752b7ae0287d582fd'/>
<id>urn:sha1:a655438988c5f7d100a5423752b7ae0287d582fd</id>
<content type='text'>
</content>
</entry>
<entry>
<title>rustc_mir: Re-use `report_selection_error`.</title>
<updated>2019-07-07T18:51:31+00:00</updated>
<author>
<name>David Wood</name>
<email>david@davidtw.co</email>
</author>
<published>2019-06-12T07:26:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=813c994a754b963660b2030699ee1b77c5886ed5'/>
<id>urn:sha1:813c994a754b963660b2030699ee1b77c5886ed5</id>
<content type='text'>
This commit replaces the new error that was being emitted in NLL type
check with a call to `report_selection_error` so that the same trait
error as before this PR is emitted.
</content>
</entry>
<entry>
<title>syntax: Add feature gate.</title>
<updated>2019-07-07T18:51:29+00:00</updated>
<author>
<name>David Wood</name>
<email>david@davidtw.co</email>
</author>
<published>2019-06-12T06:56:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3cca4ceed833493b7ce18c825f14ddd927920e10'/>
<id>urn:sha1:3cca4ceed833493b7ce18c825f14ddd927920e10</id>
<content type='text'>
This commit adds a `const_in_array_repeat_expressions` feature gate and
only create `Candidate::Repeat` if it is enabled.
</content>
</entry>
<entry>
<title>rustc/rustc_mir: Implement RFC 2203.</title>
<updated>2019-07-07T18:51:09+00:00</updated>
<author>
<name>David Wood</name>
<email>david@davidtw.co</email>
</author>
<published>2019-05-26T11:57:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=485a80255b13840551e08f34a268528bbb2a33d9'/>
<id>urn:sha1:485a80255b13840551e08f34a268528bbb2a33d9</id>
<content type='text'>
This commit implements RFC 2203, allowing constants in array repeat
expressions.

Firstly, the check that the array repeat expression implements `Copy` is
removed and re-implemented in `rustc_mir::borrow_check::nll::type_check`
by emitting an error when the MIR contains a `Operand::Move` and the
type does not implement `Copy`.

Next, the `qualify_consts` pass is modified to construct a
`Candidate::Repeat` when it would be correct to promote a array repeat
expression.

Finally, the `promote_consts` pass is modified to promote the candidates
previously identified.
</content>
</entry>
</feed>
