Skip to content

Resolve ambiguity between std and rs::std namespaces in iterator_adapter.h#1210

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_931405770
Open

Resolve ambiguity between std and rs::std namespaces in iterator_adapter.h#1210
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_931405770

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Jun 13, 2026

Copy link
Copy Markdown

Resolve ambiguity between std and rs::std namespaces in iterator_adapter.h

Most of our support C++ code can unambiguously refer to the top-level std namespace with just std. But Crubit binds Rust's std crate in the rs::std namespace, so inside the rs namespace, std resolves to that instead of the top-level std.

I checked for uses of namespace rs { and only found the one in this header, so I added a quick test that declares the rs::std namespace and includes the header, just to make sure that keeps compiling. I think that won't catch anything that can be SFINAE'd out, so we will want to cover this header with more tests in the future.

…adapter.h

Most of our support C++ code can unambiguously refer to the top-level `std` namespace with just `std`. But Crubit binds Rust's `std` crate in the `rs::std` namespace, so inside the `rs` namespace, `std` resolves to that instead of the top-level `std`.

I checked for uses of `namespace rs {` and only found the one in this header, so I added a quick test that declares the `rs::std` namespace and includes the header, just to make sure that keeps compiling. I think that won't catch anything that can be SFINAE'd out, so we will want to cover this header with more tests in the future.

PiperOrigin-RevId: 931405770
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.

1 participant