Skip to content

Conversation

cpeterso
Copy link
Contributor

Without this fix, the following program fails to compile because the ge() function is not exported from the f32, f64, or float modules:

fn main() {
f32::lt(0f32, 0f32);
f32::le(0f32, 0f32);
f32::eq(0f32, 0f32);
f32::ne(0f32, 0f32);
f32::ge(0f32, 0f32);
f32::gt(0f32, 0f32);

f64::lt(0f64, 0f64);
f64::le(0f64, 0f64);
f64::eq(0f64, 0f64);
f64::ne(0f64, 0f64);
f64::ge(0f64, 0f64);
f64::gt(0f64, 0f64);

float::lt(0f64, 0f64);
float::le(0f64, 0f64);
float::eq(0f64, 0f64);
float::ne(0f64, 0f64);
float::ge(0f64, 0f64);
float::gt(0f64, 0f64);

}

test.rs:6:4: 6:11 error: unresolved name: f32::ge
test.rs:6 f32::ge(0f32, 0f32);
^~~~~~~
test.rs:6:4: 6:11 error: unresolved name: f32::ge
test.rs:6 f32::ge(0f32, 0f32);
^~~~~~~
test.rs:13:4: 13:11 error: unresolved name: f64::ge
test.rs:13 f64::ge(0f64, 0f64);
^~~~~~~
test.rs:13:4: 13:11 error: unresolved name: f64::ge
test.rs:13 f64::ge(0f64, 0f64);
^~~~~~~
test.rs:20:4: 20:13 error: unresolved name: float::ge
test.rs:20 float::ge(0f64, 0f64);
^~~~~~~~~
test.rs:20:4: 20:13 error: unresolved name: float::ge
test.rs:20 float::ge(0f64, 0f64);
^~~~~~~~~
error: aborting due to 6 previous errors

@brson
Copy link
Contributor

brson commented Aug 13, 2012

Thanks! Rebased and pushed to incoming.

@brson brson closed this Aug 13, 2012
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jan 30, 2021
`manual_filter_map` and `manual_find_map`

changelog: Add `manual_filter_map` and replace `find_map` with `manual_find_map`

Replaces rust-lang#6453

Fixes rust-lang#3188
Fixes rust-lang#4193

~Depends on rust-lang#6567 (to fix an internal lint false positive)~

This replaces `filter_map` and `find_map` with `manual_filter_map` and `manual_find_map` respectively. However, `filter_map` is left in place since it is used for a variety of other cases. See discussion in rust-lang#6453.
bors pushed a commit to rust-lang-ci/rust that referenced this pull request May 15, 2021
do not add a newline after a missed span if it is the end of a block comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants