Skip to content

Nightly regression - Option::cloned method resolution #44208

Closed
@CAD97

Description

@CAD97

unic-ucd-normal (and thus the supercrate unic) was compiling on rustc 1.21.0-nightly (e26688824 2017-08-27) but fails on rustc 1.21.0-nightly (c11f689d2 2017-08-29). (This is with the unpublished version at https://github.com/behnam/rust-unic/tree/master/unic/ucd/normal only.)
Passing build & Failing build

   Compiling unic-ucd-normal v0.5.0 (file:///D:/Christopher/Documents/Code/Rust/rust-unic/unic/ucd/normal)
error[E0034]: multiple applicable items in scope
  --> unic\ucd\normal\src\lib.rs:63:65
   |
63 |         canonical_composition(a).and_then(|table| table.find(b).cloned())
   |                                                                 ^^^^^^ multiple `cloned` found
   |
   = note: candidate #1 is defined in an impl for the type `std::option::Option<&_>`
   = note: candidate #2 is defined in an impl for the type `std::option::Option<&mut _>`

This appears to be #43738 (tracking) / #43705 (impl) that is causing this. Note that we do not have #![feature(option_ref_mut_cloned)] (it didn't exist until today(?)).

Small reproduction in #44208 (comment)

Metadata

Metadata

Assignees

Labels

A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyC-bugCategory: This is a bug.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions