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

Remove unsafe `unsafe` inner function. #56236

Merged
merged 1 commit into from Nov 29, 2018

Conversation

Projects
None yet
3 participants
@frewsxcv
Member

frewsxcv commented Nov 26, 2018

Within this Iterator implementation, a function unsafe_get is
defined which unsafely allows unchecked indexing of any element in a
slice. This should be marked as unsafe, but it is not.

To address this issue, I removed that inner function.

@frewsxcv frewsxcv force-pushed the frewsxcv:frewsxcv-unsafe-unsafe branch from c9dfaaf to cee6dcc Nov 26, 2018

Remove unsafe `unsafe` inner function.
Within this `Iterator` implementation, a function `unsafe_get` is
defined which unsafely allows _unchecked_ indexing of any element in a
slice. This should be marked as _unsafe_, but it is not.

To address this issue, I removed that inner function.

@frewsxcv frewsxcv force-pushed the frewsxcv:frewsxcv-unsafe-unsafe branch from cee6dcc to cc46685 Nov 26, 2018

@rust-lang rust-lang deleted a comment from rust-highfive Nov 26, 2018

@rust-lang rust-lang deleted a comment from rust-highfive Nov 26, 2018

@cramertj

This comment has been minimized.

Member

cramertj commented Nov 26, 2018

@bors r+ rollup

@bors

This comment has been minimized.

Contributor

bors commented Nov 26, 2018

📌 Commit cc46685 has been approved by cramertj

kennytm added a commit to kennytm/rust that referenced this pull request Nov 27, 2018

Rollup merge of rust-lang#56236 - frewsxcv:frewsxcv-unsafe-unsafe, r=…
…cramertj

Remove unsafe `unsafe` inner function.

Within this `Iterator` implementation, a function `unsafe_get` is
defined which unsafely allows _unchecked_ indexing of any element in a
slice. This should be marked as _unsafe_, but it is not.

To address this issue, I removed that inner function.

bors added a commit that referenced this pull request Nov 27, 2018

Auto merge of #56276 - kennytm:rollup, r=kennytm
Rollup of 9 pull requests

Successful merges:

 - #55821 (Use sort_by_cached_key when the key function is not trivial/free)
 - #56114 (Enclose type in backticks for "non-exhaustive patterns" error)
 - #56127 (Update an outdated comment in mir building)
 - #56205 (Fix ICE with feature self_struct_ctor)
 - #56216 (Add TryFrom<&[T]> for [T; $N] where T: Copy)
 - #56223 (Make JSON output from -Zprofile-json valid)
 - #56224 (Update cargo)
 - #56236 (Remove unsafe `unsafe` inner function.)
 - #56255 (Update outdated code comments in StringReader)

Failed merges:

r? @ghost

pietroalbini added a commit to pietroalbini/rust that referenced this pull request Nov 28, 2018

Rollup merge of rust-lang#56236 - frewsxcv:frewsxcv-unsafe-unsafe, r=…
…cramertj

Remove unsafe `unsafe` inner function.

Within this `Iterator` implementation, a function `unsafe_get` is
defined which unsafely allows _unchecked_ indexing of any element in a
slice. This should be marked as _unsafe_, but it is not.

To address this issue, I removed that inner function.

pietroalbini added a commit to pietroalbini/rust that referenced this pull request Nov 28, 2018

Rollup merge of rust-lang#56236 - frewsxcv:frewsxcv-unsafe-unsafe, r=…
…cramertj

Remove unsafe `unsafe` inner function.

Within this `Iterator` implementation, a function `unsafe_get` is
defined which unsafely allows _unchecked_ indexing of any element in a
slice. This should be marked as _unsafe_, but it is not.

To address this issue, I removed that inner function.

bors added a commit that referenced this pull request Nov 28, 2018

Auto merge of #56325 - pietroalbini:rollup, r=pietroalbini
Rollup of 29 pull requests

Successful merges:

 - #55391 (bootstrap: clean up a few clippy findings)
 - #55821 (Use sort_by_cached_key when the key function is not trivial/free)
 - #56014 (add test for issue #21335)
 - #56021 (avoid features_untracked)
 - #56023 (atomic::Ordering: Get rid of misleading parts of intro)
 - #56044 (Drop partially bound function parameters in the expected order)
 - #56080 (Reduce the amount of bold text at doc.rlo)
 - #56090 (Overhaul `FileSearch` and `SearchPaths`)
 - #56114 (Enclose type in backticks for "non-exhaustive patterns" error)
 - #56124 (Fix small doc mistake on std::io::read::read_to_end)
 - #56127 (Update an outdated comment in mir building)
 - #56131 (Assorted tweaks)
 - #56148 (Add rustc-guide as a submodule)
 - #56149 (Make std::os::unix/linux::fs::MetadataExt::a/m/ctime* documentation clearer)
 - #56165 (drop glue takes in mutable references, it should reflect that in its type)
 - #56205 (Fix ICE with feature self_struct_ctor)
 - #56216 (Add TryFrom<&[T]> for [T; $N] where T: Copy)
 - #56220 (Suggest appropriate place for lifetime when declared after type arguments)
 - #56223 (Make JSON output from -Zprofile-json valid)
 - #56236 (Remove unsafe `unsafe` inner function.)
 - #56245 (Stabilize feature `macro_at_most_once_rep`)
 - #56255 (Update outdated code comments in StringReader)
 - #56257 (rustc-guide has moved to rust-lang/)
 - #56268 (Reuse the `P` in `InvocationCollector::fold_{,opt_}expr`.)
 - #56273 (Add missing doc link)
 - #56285 (move stage0.txt to toplevel directory)
 - #56289 (Fix small typo in comment of thread::stack_size)
 - #56294 (Fix a typo in the documentation of std::ffi)
 - #56300 (Fix alignment of stores to scalar pair)

Failed merges:

r? @ghost

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Nov 29, 2018

Rollup merge of rust-lang#56236 - frewsxcv:frewsxcv-unsafe-unsafe, r=…
…cramertj

Remove unsafe `unsafe` inner function.

Within this `Iterator` implementation, a function `unsafe_get` is
defined which unsafely allows _unchecked_ indexing of any element in a
slice. This should be marked as _unsafe_, but it is not.

To address this issue, I removed that inner function.

bors added a commit that referenced this pull request Nov 29, 2018

Auto merge of #56340 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 22 pull requests

Successful merges:

 - #55391 (bootstrap: clean up a few clippy findings)
 - #56021 (avoid features_untracked)
 - #56023 (atomic::Ordering: Get rid of misleading parts of intro)
 - #56080 (Reduce the amount of bold text at doc.rlo)
 - #56114 (Enclose type in backticks for "non-exhaustive patterns" error)
 - #56124 (Fix small doc mistake on std::io::read::read_to_end)
 - #56127 (Update an outdated comment in mir building)
 - #56148 (Add rustc-guide as a submodule)
 - #56149 (Make std::os::unix/linux::fs::MetadataExt::a/m/ctime* documentation clearer)
 - #56220 (Suggest appropriate place for lifetime when declared after type arguments)
 - #56223 (Make JSON output from -Zprofile-json valid)
 - #56236 (Remove unsafe `unsafe` inner function.)
 - #56255 (Update outdated code comments in StringReader)
 - #56257 (rustc-guide has moved to rust-lang/)
 - #56273 (Add missing doc link)
 - #56289 (Fix small typo in comment of thread::stack_size)
 - #56294 (Fix a typo in the documentation of std::ffi)
 - #56312 (Deduplicate literal -> constant lowering)
 - #56319 (fix futures creating aliasing mutable and shared ref)
 - #56321 (rustdoc: add bottom margin spacing to nested lists)
 - #56322 (resolve: Fix false-positives from lint `absolute_paths_not_starting_with_crate`)
 - #56330 (Clean up span in non-trailing `..` suggestion)

Failed merges:

r? @ghost

@bors bors merged commit cc46685 into rust-lang:master Nov 29, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@frewsxcv frewsxcv deleted the frewsxcv:frewsxcv-unsafe-unsafe branch Nov 29, 2018

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