Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 5 commits into from
Dec 25, 2017

Conversation

mikeyhew
Copy link
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
Contributor

arielb1 commented Dec 21, 2017

Needs a rebase

@arielb1
Copy link
Contributor

arielb1 commented Dec 21, 2017

r=me with a rebase

@kennytm kennytm 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
Contributor Author

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
Contributor

arielb1 commented Dec 22, 2017

Still errors in rustc_data_structures

@CAD97
Copy link
Contributor

CAD97 commented Dec 23, 2017

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
Contributor Author

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

@kennytm kennytm 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
Contributor

arielb1 commented Dec 23, 2017

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
Contributor

arielb1 commented Dec 23, 2017

@bors r+

@bors
Copy link
Contributor

bors commented Dec 23, 2017

📌 Commit 60e6629 has been approved by arielb1

@bors
Copy link
Contributor

bors commented Dec 25, 2017

⌛ 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
Copy link
Contributor

bors commented Dec 25, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: 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