commit | 93513ecebe913ffa5789717ca0db9d9a87e63325 | [log] [tgz] |
---|---|---|
author | Lukasz Anforowicz <lukasza@google.com> | Fri Feb 10 14:21:20 2023 -0800 |
committer | Copybara-Service <copybara-worker@google.com> | Fri Feb 10 14:21:47 2023 -0800 |
tree | de4468122bb58046d173c3e58537321177375530 | |
parent | af1abf5b71c5a160bb2865dbe31cf97249d0e333 [diff] |
Avoiding calling `FullyQualifiedName::new` for `impl` blocks. Before this CL, `format_item` would return an error for `impl` blocks. The errors are sorted with other snippets into the right location and namespace which requires a call to `FullyQualifiedName::new`. And before and after this CL `FullyQualifiedName::new` panics when trying to get a `Symbol` associated with an `impl` block. After this CL, `format_item` returns `None` to silently skip `impl` blocks. This is only temporary - in the next CL we will start to format contents of the `impl` blocks (initially just emitting errors for all individual impl items). PiperOrigin-RevId: 508753790
Extremely experimental interop tooling for C++ and Rust.
Please don‘t use, this is an experiment and we don’t yet know where will it take us. There will be breaking changes without warning. Unfortunately, we can't take contributions at this point.
$ apt install clang lld bazel $ git clone git@github.com:google/crubit.git $ cd crubit $ bazel build --linkopt=-fuse-ld=/usr/bin/ld.lld //rs_bindings_from_cc:rs_bindings_from_cc_impl
$ git clone https://github.com/llvm/llvm-project $ cd llvm-project $ CC=clang CXX=clang++ cmake -S llvm -B build -DLLVM_ENABLE_PROJECTS='clang' -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install $ cmake --build build -j $ # wait... $ cmake --install build $ cd ../crubit $ LLVM_INSTALL_PATH=../llvm-project/install bazel build //rs_bindings_from_cc:rs_bindings_from_cc_impl