Skip to content

Convert warning about *const _ to a future-compat lint - #46914

Merged
bors merged 5 commits into
rust-lang:masterfrom
mikeyhew:raw_pointer_self
Dec 25, 2017
Merged

Convert warning about *const _ to a future-compat lint#46914
bors merged 5 commits into
rust-lang:masterfrom
mikeyhew:raw_pointer_self

Conversation

@mikeyhew

Copy link
Copy Markdown
Contributor

#46664 was merged before I could convert the soft warning about method lookup on *const _ into a future-compatibility lint. This PR makes that change.

fixes#46837
tracking issue for the future-compatibility lint: #46906

r? @arielb1

@arielb1

Copy link
Copy Markdown
Contributor

Needs a rebase

@arielb1

Copy link
Copy Markdown
Contributor

r=me with a rebase

@kennytmkennytm added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Dec 21, 2017
@mikeyhew

Copy link
Copy Markdown
ContributorAuthor

Oh true, I had a hunch this would cause an error because of deny(warnings). I'll update libstd and push again

@arielb1

Copy link
Copy Markdown
Contributor

Still errors in rustc_data_structures

@CAD97

CAD97 commented Dec 23, 2017

Copy link
Copy Markdown
Contributor

These further changes got my local copy (x86_64-pc-windows-msvc) to pass a local test:

EDIT: (Well, most of one. Didn't have Make installed yet so those tests failed and prevented the rustdoc tests apparently)

src/librustc_data_structures/array_vec.rs

-141 let arr = &mut self.values as &mut [ManuallyDrop<_>];+141 let arr = &mut self.values as &mut [ManuallDrop<<A as Array>::Element>];
...
-263 let arr = &mut source_array_vec.values as &mut [ManualyDrop<_>];+263 let arr =+264 &mut source_array_vec.values as &mut [ManuallyDrop<<A as Array>::Element>];

src/libstd/sys/windows/fs.rs

-773 let buf = &mut (*db).ReparseTarget as *mut _;+773 let buf = &mut (*db).ReparseTarget as *mut c::WCHAR;

commit at CAD97@0563701 if you just want to add that to the PR.

@mikeyhew

Copy link
Copy Markdown
ContributorAuthor

@CAD97 thanks! I develop on OSX, so would have had to wait for AppVeyor to fail before I could fix the windows errors

@kennytmkennytm added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 23, 2017
@arielb1

Copy link
Copy Markdown
Contributor

doc test failure:

[01:12:44] ---- ptr.rs - ptr::*mut T::copy_from (line 1827) stdout ----
[01:12:44] error: the type of this value must be known in this context
[01:12:44] --> ptr.rs:10:22
[01:12:44] |
[01:12:44] 10 | dst.as_mut_ptr().copy_from(ptr, elts);
[01:12:44] | ^^^^^^^^^
[01:12:44] |
[01:12:44] note: lint level defined here
[01:12:44] --> ptr.rs:1:9
[01:12:44] |
[01:12:44] 1 | #![deny(warnings)]
[01:12:44] | ^^^^^^^^
[01:12:44] = note: #[deny(tyvar_behind_raw_pointer)] implied by #[deny(warnings)]
[01:12:44] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
[01:12:44] = note: for more information, see issue #46906 <https://github.com/rust-lang/rust/issues/46906>
[01:12:44] [01:12:44] thread 'rustc' panicked at 'couldn't compile the test', /checkout/src/librustdoc/test.rs:286:12
[01:12:44] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[01:12:44] [01:12:44] ---- ptr.rs - ptr::*mut T::copy_from_nonoverlapping (line 1866) stdout ----
[01:12:44] error: the type of this value must be known in this context
[01:12:44] --> ptr.rs:10:22
[01:12:44] |
[01:12:44] 10 | dst.as_mut_ptr().copy_from_nonoverlapping(ptr, elts);
[01:12:44] | ^^^^^^^^^^^^^^^^^^^^^^^^
[01:12:44] |
[01:12:44] note: lint level defined here
[01:12:44] --> ptr.rs:1:9
[01:12:44] |
[01:12:44] 1 | #![deny(warnings)]
[01:12:44] | ^^^^^^^^
[01:12:44] = note: #[deny(tyvar_behind_raw_pointer)] implied by #[deny(warnings)]
[01:12:44] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
[01:12:44] = note: for more information, see issue #46906 <https://github.com/rust-lang/rust/issues/46906>
[01:12:44] [01:12:44] thread 'rustc' panicked at 'couldn't compile the test', /checkout/src/librustdoc/test.rs:286:12
[01:12:44] [01:12:44] [01:12:44] failures:
[01:12:44] ptr.rs - ptr::*mut T::copy_from (line 1827)
[01:12:44] ptr.rs - ptr::*mut T::copy_from_nonoverlapping (line 1866)

@arielb1

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Dec 23, 2017

Copy link
Copy Markdown
Collaborator

📌 Commit 60e6629 has been approved by arielb1

@bors

bors commented Dec 25, 2017

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 60e6629 with merge a6fc844...

bors added a commit that referenced this pull request Dec 25, 2017
Convert warning about `*const _` to a future-compat lint
#46664 was merged before I could convert the soft warning about method lookup on `*const _` into a future-compatibility lint. This PR makes that change.
fixes#46837
tracking issue for the future-compatibility lint: #46906
r? @arielb1
@bors

bors commented Dec 25, 2017

Copy link
Copy Markdown
Collaborator

☀️ Test successful - status-appveyor, status-travis
Approved by: arielb1
Pushing a6fc844 to master...

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-reviewStatus: Awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

E0619 diagnostic occurs twice in rustc source

5 participants

@mikeyhew@arielb1@CAD97@bors@kennytm