profile
viewpoint
Tamir Duberstein tamird @google New York, NY

lib/pq 6117

Pure Go Postgres driver for database/sql

grpc/grpc-web 4769

gRPC for Web Clients

mperham/connection_pool 1259

Generic connection pooling for Ruby

jawspeak/ruby-docx-templater 141

A Ruby library to template Microsoft Word .docx files. Generates new Word .docx files based on a template file. Does templating entirely in memory.

tamird/cockroach 6

A Scalable, Geo-Replicated, Transactional Datastore

tamird/CS212 5

Udacity CS212 April 2012 Exam Solutions

tamird/pcap 1

Rust language pcap library

issue commentgoogle/gvisor

Test SO_BINDTODEVICE behavior after the bound device is removed

@brunowonka can we do this by creating a TAP device using netlink?

eyalsoha

comment created time in 5 days

issue commentgoogle/gvisor

Implement silly window syndrome prevention on receive side

Sounds related to https://github.com/google/gvisor/issues/1509#issuecomment-694852634.

majek

comment created time in 5 days

issue commentgoogle/gvisor

tcpip.Payloader is a reimplementation of io.Reader

We may need a deeper rethink of the tcpip.Endpoint API to address longstanding integration issues with Fuchsia. In particular, Fuchsia currently uses a pair of loops to shuttle bytes and signals between a zircon socket and the tcpip.Endpoint. This is necessary because networking is implemented in userspace in Fuchisa, meaning the networking implementation cannot read applications' memory:

+-------------+     +-----------------------+     +----------+
| Application | --- | Kernel-managed socket | --- | Netstack |
+-------------+     +-----------------------+     +----------+

This results in odd behaviour such as certain errors being first observed and consumed by these loops (e.g. ECONNRESET), preventing retrieval by getsockopt(..., SO_ERROR) without addition work to cache those errors in the integrator. It would be better to teach tcpip.Endpoint (stream endpoints in particular) about externally furnished buffers, which would address this problem.

cc @ghanan94

tamird

comment created time in 6 days

issue openedgoogle/gvisor

incoming multicast is filtered only at the NIC

This bug seems to have existed since multicast support was added.

When an endpoint joins a multicast group, it adds the multicast address to the NIC's list of permanent addresses: https://github.com/google/gvisor/blob/b6ca96b9b9e71ba57653cf9d3ef0767771949378/pkg/tcpip/transport/udp/endpoint.go#L761-L763

However, when a multicast packet is delivered to the NIC, no per-endpoint filtering occurs: https://github.com/google/gvisor/blob/b6ca96b9b9e71ba57653cf9d3ef0767771949378/pkg/tcpip/stack/transport_demuxer.go#L166-L172

This has two disasterous implications:

  1. any endpoint bound to a NIC that has any endpoints which belong to a multicast group will receive those groups' traffic
  2. any endpoint that sends outbound multicast traffic will also receive it, regardless of its membership and regardless of the NIC's membership in the group. this is due to the PacketLoop optimization: https://github.com/google/gvisor/blob/b6ca96b9b9e71ba57653cf9d3ef0767771949378/pkg/tcpip/network/ipv4/ipv4.go#L256-L260 which circumvents NIC address checking.

cc @iangudger in case you have a good solution. I was able to fix this with this bandaid patch:

diff --git a/pkg/tcpip/transport/udp/endpoint.go b/pkg/tcpip/transport/udp/endpoint.go
index 0a9d3c6c..f15d28e8 100644
--- a/pkg/tcpip/transport/udp/endpoint.go
+++ b/pkg/tcpip/transport/udp/endpoint.go
@@ -1403,6 +1403,20 @@ func (e *endpoint) HandlePacket(r *stack.Route, id stack.TransportEndpointID, pk
                return
        }
 
+       if header.IsV4MulticastAddress(id.LocalAddress) ||
+                       header.IsV6MulticastAddress(id.LocalAddress) {
+               var found bool
+               for _, mem := range e.multicastMemberships {
+                       if mem.multicastAddr == id.LocalAddress {
+                               found = true
+                               break
+                       }
+               }
+               if !found {
+                       return
+               }
+       }
+
        if !verifyChecksum(r, hdr, pkt) {
                // Checksum Error.
                e.stack.Stats().UDP.ChecksumErrors.Increment()

however I think a more appropriate fix is to avoid these endpoints in this call to findAllEndpointsLocked: https://github.com/google/gvisor/blob/b6ca96b9b9e71ba57653cf9d3ef0767771949378/pkg/tcpip/stack/transport_demuxer.go#L531

Discovered via https://bugs.chromium.org/p/chromium/issues/detail?id=1127298.

created time in 11 days

issue openedgoogle/gvisor

sniffer doesn't recognize router solicitations

With the sniffer enabled, I see logs like:

recv fe80::447f:e5ff:fe4f:fa92 -> ff02::16 unknown transport protocol: 0

a bit of searching finds the destination adress is header.IPv6AllRoutersMulticastAddress which is used in (*stack.ndpState).startSolicitingRouters.

We should figure out why the sniffer can't parse this packet (hopefully we're not crafting it incorrectly).

created time in 11 days

issue commentgoogle/gvisor

bind to multicast address fails unless group membership is present

cc @ghanan94

tamird

comment created time in 22 days

issue openedgoogle/gvisor

bind to multicast address fails unless group membership is present

Failing snippet:

  struct sockaddr_in addr = {
      .sin_family = AF_INET,
      .sin_addr.s_addr = htonl(INADDR_LOOPBACK),
  };

#if defined(__Fuchsia__) // stand-in for gvisor
  fbl::unique_fd s;
#endif
  if (multicast) {
    int n = inet_pton(addr.sin_family, "224.0.2.1", &addr.sin_addr);
    ASSERT_GE(n, 0) << strerror(errno);
    ASSERT_EQ(n, 1);

#if defined(__Fuchsia__)
    ASSERT_TRUE(s = fbl::unique_fd(socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP))) << strerror(errno);
    ip_mreqn param = {
        .imr_multiaddr = addr.sin_addr,
        .imr_address.s_addr = htonl(INADDR_ANY),
        .imr_ifindex = 1,
    };
    ASSERT_EQ(setsockopt(s.get(), SOL_IP, IP_ADD_MEMBERSHIP, &param, sizeof(param)), 0)
        << strerror(errno);
#endif
  }

  fbl::unique_fd s1;
  ASSERT_TRUE(s1 = fbl::unique_fd(socket(AF_INET, type, 0))) << strerror(errno);
  ASSERT_EQ(setsockopt(s1.get(), SOL_SOCKET, SO_REUSEPORT, &on, sizeof(on)), 0) << strerror(errno);
  ASSERT_EQ(bind(s1.get(), reinterpret_cast<const struct sockaddr*>(&addr), sizeof(addr)), 0)
      << strerror(errno); // this fails on gvisor without the `#if defined` above

@hbhasker for triage.

created time in 22 days

issue commentgoogle/gvisor

TestDiscardsUDPPacketsWithMcastSourceAddressV6 is flaky

Another kind of flake on the same test https://source.cloud.google.com/results/invocations/018807ef-5d7a-4612-aa54-157062acbc71/targets/bazel-testlogs%2Ftest%2Fpacketimpact%2Ftests%2Fudp_discard_mcast_source_addr_netstack_test/tests

=== RUN   TestOne
    TestOne: packetimpact_test.go:315: test error: process terminated with status: 1, expect failure: false

        ====== Begin of DUT Logs ======

        posix_server is starting.
        Got IP 0.0.0.0 and port 40000.
        Server listening on 0.0.0.0:40000


        ====== End of DUT Logs ======

        ====== Begin of Testbench Logs ======

        --- FAIL: TestDiscardsUDPPacketsWithMcastSourceAddressV6 (3.32s)
            --- FAIL: TestDiscardsUDPPacketsWithMcastSourceAddressV6/srcaddr=fe01::42 (0.04s)
                udp_discard_mcast_source_addr_test.go:90: Recv got unexpected result, ret=0, payload="", errno=errno 0
        FAIL


        ====== End of Testbench Logs ======
--- FAIL: TestOne (48.64s)
tamird

comment created time in 24 days

issue commentgoogle/gvisor

packet buffer headers should have protocol number associated.

cc @kkrakauer

jelischer

comment created time in 25 days

issue openedgoogle/gvisor

packetimpact cleanup on error is confused

On a recent test flake, I see these logs:

==================== Test output for //test/packetimpact/tests:udp_any_addr_recv_unicast_netstack_test:
=== RUN   TestOne
2020/08/28 11:40:11 dut: copy: /home/kbuilder/.cache/bazel/_bazel_kbuilder/57519ae3f2ee465392291af4c0b9f2ad/execroot/__main__/bazel-out/k8-fastbuild/bin/test/packetimpact/tests/udp_any_addr_recv_unicast_netstack_test-bench.runfiles/__main__/test/packetimpact/dut/posix_server -> /tmp/dut-G7YDIGYVU4L366UU5YTO7CJX3CIWVVLA194011297/posix_server
    TestOne: packetimpact_test.go:182: listing devices on dut-G7YDIGYVU4L366UU5YTO7CJX3CIWVVLA container: process terminated with status: 126
2020/08/28 11:40:14 dut: error removing container "dut-G7YDIGYVU4L366UU5YTO7CJX3CIWVVLA": Error response from daemon: removal of container dut-G7YDIGYVU4L366UU5YTO7CJX3CIWVVLA is already in progress
2020/08/28 11:40:14 dut: error removing container "dut-G7YDIGYVU4L366UU5YTO7CJX3CIWVVLA": Error response from daemon: removal of container dut-G7YDIGYVU4L366UU5YTO7CJX3CIWVVLA is already in progress
2020/08/28 11:40:14 dut: error killing container "dut-G7YDIGYVU4L366UU5YTO7CJX3CIWVVLA": Error response from daemon: Cannot kill container: b14957ddb8b4a0d3a523ae953bca87aa2f447cf079ee04395f823668f9cbb98b: No such container: b14957ddb8b4a0d3a523ae953bca87aa2f447cf079ee04395f823668f9cbb98b
2020/08/28 11:40:14 dut: error removing container "dut-G7YDIGYVU4L366UU5YTO7CJX3CIWVVLA": Error: No such container: dut-G7YDIGYVU4L366UU5YTO7CJX3CIWVVLA
--- FAIL: TestOne (33.16s)
FAIL

Notice that there are 3 errors logged for attempting to remove a container that is already being removed, and one for attempting to kill a container that doesn't exist. Seems that cleanup is not coherent.

@jayzhuang @amscanne

created time in a month

issue openedgoogle/gvisor

TestDiscardsUDPPacketsWithMcastSourceAddressV6 is flaky

See https://source.cloud.google.com/results/invocations/ac5955dc-c302-4db0-a5b1-08cc51eedbb5/targets/bazel-testlogs%2Ftest%2Fpacketimpact%2Ftests%2Fudp_discard_mcast_source_addr_netstack_test/tests, which happened on a totally unrelated change (https://github.com/google/gvisor/pull/3792).

=== RUN   TestOne
    TestOne: packetimpact_test.go:315: test error: process terminated with status: 1, expect failure: false

        ====== Begin of DUT Logs ======

        posix_server is starting.
        Got IP 0.0.0.0 and port 40000.
        Server listening on 0.0.0.0:40000


        ====== End of DUT Logs ======

        ====== Begin of Testbench Logs ======

        --- FAIL: TestDiscardsUDPPacketsWithMcastSourceAddressV6 (3.30s)
            --- FAIL: TestDiscardsUDPPacketsWithMcastSourceAddressV6/srcaddr=fe01::42 (0.04s)
                udp_discard_mcast_source_addr_test.go:90: Recv got unexpected result, ret=0, payload="", errno=transport endpoint is not connected
        FAIL


        ====== End of Testbench Logs ======
--- FAIL: TestOne (47.20s)

Interestingly this happened on only one of the test cases. In any event, the error doesn't make any sense, and suggests that there's a bug in the test server (unsychronized access to errno?).

@jayzhuang can you take a look?

created time in a month

issue openedgoogle/gvisor

`accept` fails on a reset connection

  • create listener (socket, bind, listen)
  • create connector (socket)
  • connect connector to listener (connect)
  • disable linger on connector (setsockopt(<connector>, SOL_SOCKET, SO_LINGER, {l_onoff=1, l_linger=0}, ...))
  • send RST from connector (close)
  • accept the connection from listener (accept(<listener>, <non-null addr>, <non-zero len>)

Should succeed, but fails on gVisor with ENOTCONN.

created time in a month

issue closedgoogle/gvisor

Support setting the SO_LINGER socket option

This is would be useful to better manage the behavior of sockets on close or shutdown, whether we want to wait for a timeout or force a reset by turning linger off and closing the socket.

From the man page: When enabled, a close or shutdown will not return until all queued messages for the socket have been successfully sent or the linger timeout has been reached.

Get SO_LINGER is already supported.

closed time in a month

RyanHeacock

issue commentgoogle/gvisor

Support setting the SO_LINGER socket option

Done in b26f7503b545e106ea0934d2153aed54ee4374d3.

RyanHeacock

comment created time in a month

issue commentgolang/go

runtime/pprof: panic in appendLocsForStack on fuchsia-arm64

I haven't been able to reproduce locally, but the issue only appears on arm64. The previous file I provided was the amd64 binary; here's the arm64: https://gofile.io/d/xPjFh3.

tamird

comment created time in a month

issue commentgolang/go

runtime/pprof: panic in appendLocsForStack on fuchsia-arm64

https://gofile.io/d/hlPlJh

tamird

comment created time in a month

issue commentgolang/go

runtime/pprof: panic in appendLocsForStack on fuchsia-arm64

With the change above applied, here's what we see:

=== RUN   TestCPUProfileMultithreaded
stk:#   0xde474a80eb    runtime.nanotime1+0x10b /b/s/w/ir/x/w/fuchsia/out/not-default/host-tools/goroot/src/runtime/os_fuchsia.go:478
#       0xde474b1f83    runtime._System+0x3     /b/s/w/ir/x/w/fuchsia/out/not-default/host-tools/goroot/src/runtime/proc.go:3911
l.pcs:# 0xde474a80eb    runtime.nanotime1+0x10b /b/s/w/ir/x/w/fuchsia/out/not-default/host-tools/goroot/src/runtime/os_fuchsia.go:478
#       0xde474a80e4    runtime.nanotime+0x104  /b/s/w/ir/x/w/fuchsia/out/not-default/host-tools/goroot/src/runtime/time_nofake.go:19
#       0xde474a8050    runtime.suspendG+0x70   /b/s/w/ir/x/w/fuchsia/out/not-default/host-tools/goroot/src/runtime/preempt.go:252
panic: runtime error: slice bounds out of range [3:2]

goroutine 6 [running]:
runtime/pprof.(*profileBuilder).appendLocsForStack(0x1fd1c0b3340, 0x1fd1c130840, 0x0, 0x8, 0x1fd1c216130, 0x2, 0x2, 0x0, 0x6, 0x8) 
/b/s/w/ir/x/w/fuchsia/out/not-default/host-tools/goroot/src/runtime/pprof/proto.go:415 +0x640
runtime/pprof.(*profileBuilder).build(0x1fd1c0b3340)
/b/s/w/ir/x/w/fuchsia/out/not-default/host-tools/goroot/src/runtime/pprof/proto.go:366 +0xf4
runtime/pprof.profileWriter(0xde4768f8c0, 0x1fd1c10a120)
/b/s/w/ir/x/w/fuchsia/out/not-default/host-tools/goroot/src/runtime/pprof/pprof.go:813 +0xd4
created by runtime/pprof.StartCPUProfile
/b/s/w/ir/x/w/fuchsia/out/not-default/host-tools/goroot/src/runtime/pprof/pprof.go:784 +0x114
tamird

comment created time in a month

issue openedgoogle/gvisor

Improve type safety for socket options

Currently {G,S}etSockOpt take arguments of type interface{}, which means the compiler is not able to do any type checking of arguments.

We should introduce a public interface with a single private method (i.e.a marker interface) and implement it for all socket options - this will ensure that invalid types are caught at compile time.

Note that the interface should be implemented by pointers, not values, as implementing an interface on values also implements it on the value's pointer type, defeating type safety again.

cc @brunowonka @ghanan94 @hbhasker @amscanne

created time in a month

issue commentgolang/go

runtime/pprof: panic in appendLocsForStack on fuchsia-arm64

Yes, there were earlier bugs; sorry to have mislead you!

https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=44718 was filed on January 24 https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=47563 was filed on March 3

tamird

comment created time in a month

issue openedgolang/go

runtime/pprof: panic in appendLocsForStack on fuchsia-arm64

We've been seeing this issue for a while; filing this bug now that we've upgraded to go1.15. (See https://fxbug.dev/52575).

This happens sometimes when running the runtime/pprof tests:

panic: runtime error: slice bounds out of range [3:2]

goroutine 6 [running]:
runtime/pprof.(*profileBuilder).appendLocsForStack(0x3e93c15c160, 0x3e93c130840, 0x0, 0x8, 0x3e93c0560b0, 0x2, 0x2, 0x0, 0x2, 0x8) 
/b/s/w/ir/x/w/fuchsia/out/not-default/host-tools/goroot/src/runtime/pprof/proto.go:410 +0x5d4
runtime/pprof.(*profileBuilder).build(0x3e93c15c160)
/b/s/w/ir/x/w/fuchsia/out/not-default/host-tools/goroot/src/runtime/pprof/proto.go:365 +0xf4
runtime/pprof.profileWriter(0xb4050418c0, 0x3e93c386030)
/b/s/w/ir/x/w/fuchsia/out/not-default/host-tools/goroot/src/runtime/pprof/pprof.go:813 +0xd4
created by runtime/pprof.StartCPUProfile
/b/s/w/ir/x/w/fuchsia/out/not-default/host-tools/goroot/src/runtime/pprof/pprof.go:784 +0x114

There's no diff between Fuchsia's fork and go1.15 in src/runtime/pprof. See https://fuchsia.googlesource.com/third_party/go/+diff/go1.15..master.

Possibly a regression of #35538, related to #37446 and its fix in https://golang.org/cl/221577.

@prattmic

created time in a month

delete branch tamird/intellij-rust

delete branch : warnings

delete time in a month

issue openedgoogle/argh

support flattening

structopt supports "flattening", which allows one struct to be embedded in another "transparently". This is useful as documented in structopt, but also useful when two commands have the same arguments and the author does not wish to duplicate the code.

https://docs.rs/structopt/0.3.16/structopt/#flattening

created time in 2 months

delete branch tamird/rand

delete branch : typo

delete time in 2 months

PR opened rust-random/rand

Correctly spell "implementation"
+1 -1

0 comment

1 changed file

pr created time in 2 months

create barnchtamird/rand

branch : typo

created branch time in 2 months

fork tamird/rand

A Rust library for random number generation.

https://crates.io/crates/rand

fork in 2 months

delete branch tamird/backtrace-rs

delete branch : dedup

delete time in 2 months

Pull request review commentintellij-rust/intellij-rust

Fix compiler warnings

 import org.rust.lang.utils.evaluation.evaluate class RsErrorAnnotator : AnnotatorBase(), HighlightRangeExtension {     override fun isForceHighlightParents(file: PsiFile): Boolean = file is RsFile -    override fun annotateInternal(element: PsiElement, rawHolder: AnnotationHolder) {-        val holder = RsAnnotationHolder(rawHolder)-        val visitor = object : RsVisitor() {-            override fun visitBaseType(o: RsBaseType) = checkBaseType(holder, o)-            override fun visitCondition(o: RsCondition) = checkCondition(holder, o)-            override fun visitConstant(o: RsConstant) = checkConstant(holder, o)-            override fun visitTypeArgumentList(o: RsTypeArgumentList) = checkTypeArgumentList(holder, o)-            override fun visitValueParameterList(o: RsValueParameterList) = checkValueParameterList(holder, o)-            override fun visitValueArgumentList(o: RsValueArgumentList) = checkValueArgumentList(holder, o)-            override fun visitStructItem(o: RsStructItem) = checkDuplicates(holder, o)-            override fun visitEnumItem(o: RsEnumItem) = checkEnumItem(holder, o)-            override fun visitEnumVariant(o: RsEnumVariant) = checkEnumVariant(holder, o)-            override fun visitFunction(o: RsFunction) = checkFunction(holder, o)-            override fun visitImplItem(o: RsImplItem) = checkImpl(holder, o)-            override fun visitLabel(o: RsLabel) = checkLabel(holder, o)-            override fun visitLifetime(o: RsLifetime) = checkLifetime(holder, o)-            override fun visitModDeclItem(o: RsModDeclItem) = checkModDecl(holder, o)-            override fun visitModItem(o: RsModItem) = checkDuplicates(holder, o)-            override fun visitUseSpeck(o: RsUseSpeck) = checkUseSpeck(holder, o)-            override fun visitPatBox(o: RsPatBox) = checkPatBox(holder, o)-            override fun visitPatField(o: RsPatField) = checkPatField(holder, o)-            override fun visitPatBinding(o: RsPatBinding) = checkPatBinding(holder, o)-            override fun visitPatRest(o: RsPatRest) = checkPatRest(holder, o)-            override fun visitOrPat(o: RsOrPat) = checkOrPat(holder, o)-            override fun visitPath(o: RsPath) = checkPath(holder, o)-            override fun visitNamedFieldDecl(o: RsNamedFieldDecl) = checkDuplicates(holder, o)-            override fun visitRetExpr(o: RsRetExpr) = checkRetExpr(holder, o)-            override fun visitTraitItem(o: RsTraitItem) = checkDuplicates(holder, o)-            override fun visitTypeAlias(o: RsTypeAlias) = checkTypeAlias(holder, o)-            override fun visitTypeParameter(o: RsTypeParameter) = checkDuplicates(holder, o)-            override fun visitConstParameter(o: RsConstParameter) = checkConstParameter(holder, o)-            override fun visitLifetimeParameter(o: RsLifetimeParameter) = checkLifetimeParameter(holder, o)-            override fun visitVis(o: RsVis) = checkVis(holder, o)-            override fun visitVisRestriction(o: RsVisRestriction) = checkVisRestriction(holder, o)-            override fun visitUnaryExpr(o: RsUnaryExpr) = checkUnary(holder, o)-            override fun visitBinaryExpr(o: RsBinaryExpr) = checkBinary(holder, o)-            override fun visitExternCrateItem(o: RsExternCrateItem) = checkExternCrate(holder, o)-            override fun visitDotExpr(o: RsDotExpr) = checkDotExpr(holder, o)-            override fun visitYieldExpr(o: RsYieldExpr) = checkYieldExpr(holder, o)-            override fun visitArrayType(o: RsArrayType) = checkArrayType(holder, o)-            override fun visitArrayExpr(o: RsArrayExpr) = checkArrayExpr(holder, o)-            override fun visitVariantDiscriminant(o: RsVariantDiscriminant) = collectDiagnostics(holder, o)-            override fun visitPolybound(o: RsPolybound) = checkPolybound(holder, o)-            override fun visitTraitRef(o: RsTraitRef) = checkTraitRef(holder, o)-            override fun visitCallExpr(o: RsCallExpr) = checkCallExpr(holder, o)-            override fun visitBlockExpr(o: RsBlockExpr) = checkBlockExpr(holder, o)-            override fun visitBreakExpr(o: RsBreakExpr) = checkBreakExpr(holder, o)-            override fun visitContExpr(o: RsContExpr) = checkContExpr(holder, o)-            override fun visitAttr(o: RsAttr) = checkAttr(holder, o)-            override fun visitRangeExpr(o: RsRangeExpr) = checkRangeExpr(holder, o)-            override fun visitTraitType(o: RsTraitType) = checkTraitType(holder, o)-            override fun visitSelfParameter(o: RsSelfParameter) = checkParamAttrs(holder, o)-            override fun visitValueParameter(o: RsValueParameter) = checkParamAttrs(holder, o)-            override fun visitVariadic(o: RsVariadic) = checkParamAttrs(holder, o)-            override fun visitPatStruct(o: RsPatStruct) = checkRsPatStruct(holder, o)-            override fun visitPatTupleStruct(o: RsPatTupleStruct) = checkRsPatTupleStruct(holder, o)-            override fun visitStructLiteralField(o: RsStructLiteralField) = checkReferenceIsPublic(o, o, holder)-        }--        element.accept(visitor)+    override fun annotateInternal(element: PsiElement, holder: AnnotationHolder) {+        RsAnnotationHolder(holder).let {+            object : RsVisitor() {+                override fun visitBaseType(o: RsBaseType) = checkBaseType(it, o)+                override fun visitCondition(o: RsCondition) = checkCondition(it, o)+                override fun visitConstant(o: RsConstant) = checkConstant(it, o)+                override fun visitTypeArgumentList(o: RsTypeArgumentList) = checkTypeArgumentList(it, o)+                override fun visitValueParameterList(o: RsValueParameterList) = checkValueParameterList(it, o)+                override fun visitValueArgumentList(o: RsValueArgumentList) = checkValueArgumentList(it, o)+                override fun visitStructItem(o: RsStructItem) = checkDuplicates(it, o)+                override fun visitEnumItem(o: RsEnumItem) = checkEnumItem(it, o)+                override fun visitEnumVariant(o: RsEnumVariant) = checkEnumVariant(it, o)+                override fun visitFunction(o: RsFunction) = checkFunction(it, o)+                override fun visitImplItem(o: RsImplItem) = checkImpl(it, o)+                override fun visitLabel(o: RsLabel) = checkLabel(it, o)+                override fun visitLifetime(o: RsLifetime) = checkLifetime(it, o)+                override fun visitModDeclItem(o: RsModDeclItem) = checkModDecl(it, o)+                override fun visitModItem(o: RsModItem) = checkDuplicates(it, o)+                override fun visitUseSpeck(o: RsUseSpeck) = checkUseSpeck(it, o)+                override fun visitPatBox(o: RsPatBox) = checkPatBox(it, o)+                override fun visitPatField(o: RsPatField) = checkPatField(it, o)+                override fun visitPatBinding(o: RsPatBinding) = checkPatBinding(it, o)+                override fun visitPatRest(o: RsPatRest) = checkPatRest(it, o)+                override fun visitOrPat(o: RsOrPat) = checkOrPat(it, o)+                override fun visitPath(o: RsPath) = checkPath(it, o)+                override fun visitNamedFieldDecl(o: RsNamedFieldDecl) = checkDuplicates(it, o)+                override fun visitRetExpr(o: RsRetExpr) = checkRetExpr(it, o)+                override fun visitTraitItem(o: RsTraitItem) = checkDuplicates(it, o)+                override fun visitTypeAlias(o: RsTypeAlias) = checkTypeAlias(it, o)+                override fun visitTypeParameter(o: RsTypeParameter) = checkDuplicates(it, o)+                override fun visitConstParameter(o: RsConstParameter) = checkConstParameter(it, o)+                override fun visitLifetimeParameter(o: RsLifetimeParameter) = checkLifetimeParameter(it, o)+                override fun visitVis(o: RsVis) = checkVis(it, o)+                override fun visitVisRestriction(o: RsVisRestriction) = checkVisRestriction(it, o)+                override fun visitUnaryExpr(o: RsUnaryExpr) = checkUnary(it, o)+                override fun visitBinaryExpr(o: RsBinaryExpr) = checkBinary(it, o)+                override fun visitExternCrateItem(o: RsExternCrateItem) = checkExternCrate(it, o)+                override fun visitDotExpr(o: RsDotExpr) = checkDotExpr(it, o)+                override fun visitYieldExpr(o: RsYieldExpr) = checkYieldExpr(it, o)+                override fun visitArrayType(o: RsArrayType) = checkArrayType(it, o)+                override fun visitArrayExpr(o: RsArrayExpr) = checkArrayExpr(it, o)+                override fun visitVariantDiscriminant(o: RsVariantDiscriminant) = collectDiagnostics(it, o)+                override fun visitPolybound(o: RsPolybound) = checkPolybound(it, o)+                override fun visitTraitRef(o: RsTraitRef) = checkTraitRef(it, o)+                override fun visitCallExpr(o: RsCallExpr) = checkCallExpr(it, o)+                override fun visitBlockExpr(o: RsBlockExpr) = checkBlockExpr(it, o)+                override fun visitBreakExpr(o: RsBreakExpr) = checkBreakExpr(it, o)+                override fun visitContExpr(o: RsContExpr) = checkContExpr(it, o)+                override fun visitAttr(o: RsAttr) = checkAttr(it, o)+                override fun visitRangeExpr(o: RsRangeExpr) = checkRangeExpr(it, o)+                override fun visitTraitType(o: RsTraitType) = checkTraitType(it, o)+                override fun visitSelfParameter(o: RsSelfParameter) = checkParamAttrs(it, o)+                override fun visitValueParameter(o: RsValueParameter) = checkParamAttrs(it, o)+                override fun visitVariadic(o: RsVariadic) = checkParamAttrs(it, o)+                override fun visitPatStruct(o: RsPatStruct) = checkRsPatStruct(it, o)+                override fun visitPatTupleStruct(o: RsPatTupleStruct) = checkRsPatTupleStruct(it, o)+                override fun visitStructLiteralField(o: RsStructLiteralField) = checkReferenceIsPublic(o, o, it)+            }+        }.let(element::accept)

OK, done.

tamird

comment created time in 2 months

Pull request review commentintellij-rust/intellij-rust

Fix compiler warnings

 class SourceFile(         checkIsSmartMode(project)          val isExpansionFile = MacroExpansionManager.isExpansionFile(file)-        val isIndexedFile = file.isValid && (-            FileBasedIndexScanRunnableCollector.getInstance(project).shouldCollect(file) || isExpansionFile)+        val isIndexedFile = file.isValid && (isExpansionFile || ProjectFileIndex.getInstance(project).let {

OK, done.

tamird

comment created time in 2 months

push eventtamird/intellij-rust

vlad20012

commit sha 2c03275e9561724192b5f23637b84f90ff74619c

HINT: don't show a hint for single lambda param If `Show only smart hints` option is enabled, don't show parameter hints for lambda argument if it is the only argument of the function. This works for `Iterator.map()` method

view details

vlad20012

commit sha bb10084778760a0dc87a9b75caeff74cb42d722a

Fix navigation to derive items in 202

view details

Arseniy Pendryak

commit sha ed7dcca45ea3610125cf36f9c28ddd0519b8bd26

#5460: bind doc comment to macro expansion context

view details

Jakub Beránek

commit sha 39f3ddb7ec3bffa6f802d060d1b9a057f9e00ffc

COMP: prefer trait methods before private inherent methods

view details

Jakub Beránek

commit sha 236580ab87add7be6eb9d682769da591ec6be215

INT: add intention to substitute an associated type

view details

Jakub Beránek

commit sha 9d6a43825a49d27dbf49445280bfaa3d7b5e4180

REF: find occurrences for introduce constant/variable outside functions

view details

bors[bot]

commit sha c4368d1add2f869c8496edd3e1d136bbdbd4d1b5

Merge #5661 5661: COMP: prefer trait methods before private inherent methods r=vlad20012 a=Kobzol Name resolution filters items by their visibility, however in the case of the mentioned issue, it is too late. Trait methods are filtered too deeply if an inherent method exists with the same name. This PR changes it so that inherent methods are not preferred if they are not visible, thus fixing the previously given false positive. Fixes: https://github.com/intellij-rust/intellij-rust/issues/3436 Co-authored-by: Jakub Beránek <berykubik@gmail.com>

view details

bors[bot]

commit sha b263ab3f891f93fbba560682cd53588571d9a38b

Merge #5643 5643: INT: add intention to substitute an associated type r=mchernyavsky a=Kobzol This PR adds an intention to substitute an associated type with its value. Fixes: https://github.com/intellij-rust/intellij-rust/issues/2766 Co-authored-by: Jakub Beránek <berykubik@gmail.com>

view details

bors[bot]

commit sha bb172df82ca222878bb6e4e983d805f3212e3c67

Merge #5857 5857: REF: find occurrences for introduce constant/variable outside functions r=mchernyavsky a=Kobzol This PR modifies `findOccurrences` in `extraxtExpressionUtils.kt` so that it can find a corresponding context even if the extracted item is outside a function. Fixes: https://github.com/intellij-rust/intellij-rust/issues/5844 Co-authored-by: Jakub Beránek <berykubik@gmail.com>

view details

Jakub Beránek

commit sha 6b9faa94adaa5174a11fda2b379e92c052f46363

NAV: allow navigation from RsAbstractable to its implementations

view details

bors[bot]

commit sha cda7a18c5ad03e473f301d3dde2a37fb72b57243

Merge #5842 5842: HINT: don't show a hint for single lambda param r=ortem a=vlad20012 If `Show only smart hints` option is enabled, don't show parameter hints for lambda argument if it is the only argument of the function. This works for `Iterator.map()` method, i.e. no such artifacts anymore: ![image](https://user-images.githubusercontent.com/3221931/89030570-6a67b700-d339-11ea-9d34-c6eee818dabe.png) Co-authored-by: vlad20012 <beskvlad@gmail.com>

view details

Dmitry Murzin

commit sha cf78ac6e1e4850071fbb300cd62c18a0aa4f096a

REF: Update references in move items refactoring

view details

bors[bot]

commit sha 4736b08be5931276e57ed346d974afdba1309d0a

Merge #5736 5736: REF: Update references in move items refactoring r=ortem a=dima74 Update references in [move items refactoring](https://github.com/intellij-rust/intellij-rust/issues/3531#issuecomment-643142894): * Inside references (to moved items - both from old mod and from other mods) * Outside references (from moved items - both to old mod and to other mods) --- Please see comment for `RsMoveCommonProcessor` for detailed description I will add tests later (after merging #5665), but anyway all existing tests can be found [here](https://github.com/intellij-rust/intellij-rust/blob/diralik/move/src/test/kotlin/org/rust/ide/refactoring/move/RsMoveTopLevelItemsTest.kt) Co-authored-by: Dmitry Murzin <diralik@yandex.ru>

view details

vlad20012

commit sha bcdc01d9d48f7ab1150b94f743c530a77a95e2b8

RES: fix private reexport with `crate::` path

view details

bors[bot]

commit sha b143ebc41ae0e1b74730b455acdf5f3d18c61671

Merge #5801 #5853 5801: Fix navigation to derive items in 2020.2 r=undin a=vlad20012 Fixes #5531 The old hack doesn't work anymore, I invented a new one 5853: RES: fix private reexport with `crate::` path r=vlad20012 a=vlad20012 Fixes #4664 Co-authored-by: vlad20012 <beskvlad@gmail.com>

view details

vlad20012

commit sha 88aee297f3a0002a48bc2a784b94d1e53ba2d8f3

Fix ArrayIndexOutOfBoundsException ... in macro completion

view details

vlad20012

commit sha cf8850bb2fcb698a7710fb61a4a442585c2f3552

Fix `invalidate caches / restart` on 203

view details

Arseniy Pendryak

commit sha ec3b6819329667e422bafcceb620df9404ed1a32

#5460: don't skip doc comments provided by macro definition

view details

bors[bot]

commit sha d935eb0de0ce4764ff33feeb0c67c96460e0897f

Merge #5862 #5863 5862: Fix ArrayIndexOutOfBoundsException in macro completion r=vlad20012 a=vlad20012 Possibly fixes this exception during macro completion: <details> <summary>Stacktrace</summary> ``` java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 256 at gnu.trove.TIntArrayList.get(TIntArrayList.java:234) at com.intellij.lang.impl.MarkerProduction.getStartMarkerAt(MarkerProduction.java:122) at com.intellij.lang.impl.PsiBuilderImpl.error(PsiBuilderImpl.java:889) at com.intellij.lang.impl.PsiBuilderAdapter.error(PsiBuilderAdapter.java:100) at com.intellij.lang.parser.GeneratedParserUtilBase.reportError(GeneratedParserUtilBase.java:807) at com.intellij.lang.parser.GeneratedParserUtilBase.reportFrameError(GeneratedParserUtilBase.java:825) at com.intellij.lang.parser.GeneratedParserUtilBase.enter_section_(GeneratedParserUtilBase.java:462) at com.intellij.lang.parser.GeneratedParserUtilBase.enter_section_(GeneratedParserUtilBase.java:454) at org.rust.lang.core.parser.RustParser.Expr(RustParser.java:6892) at org.rust.lang.core.macros.FragmentKind.parse(FragmentKind.kt:39) at org.rust.lang.core.macros.MacroGraphWalker.processMatcher(MacroGraphWalker.kt:99) at org.rust.lang.core.macros.MacroGraphWalker.run(MacroGraphWalker.kt:61) at org.rust.lang.core.completion.RsPartialMacroArgumentCompletionProvider.addCompletions(RsPartialMacroArgumentCompletionProvider.kt:55) at com.intellij.codeInsight.completion.CompletionProvider.addCompletionVariants(CompletionProvider.java:32) at com.intellij.codeInsight.completion.CompletionContributor.fillCompletionVariants(CompletionContributor.java:155) at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:76) at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:154) at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:146) at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:142) at com.intellij.codeInsight.template.impl.LiveTemplateCompletionContributor$1.addCompletions(LiveTemplateCompletionContributor.java:88) at com.intellij.codeInsight.completion.CompletionProvider.addCompletionVariants(CompletionProvider.java:32) at com.intellij.codeInsight.completion.CompletionContributor.fillCompletionVariants(CompletionContributor.java:155) at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:76) at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:59) at com.intellij.codeInsight.completion.CompletionService.performCompletion(CompletionService.java:132) at com.intellij.codeInsight.completion.BaseCompletionService.performCompletion(BaseCompletionService.java:36) at com.intellij.codeInsight.completion.CompletionProgressIndicator.lambda$calculateItems$10(CompletionProgressIndicator.java:854) at com.intellij.util.indexing.FileBasedIndex.lambda$ignoreDumbMode$0(FileBasedIndex.java:149) at com.intellij.util.indexing.FileBasedIndexImpl.ignoreDumbMode(FileBasedIndexImpl.java:650) at com.intellij.util.indexing.FileBasedIndex.ignoreDumbMode(FileBasedIndex.java:148) at com.intellij.codeInsight.completion.CompletionProgressIndicator.calculateItems(CompletionProgressIndicator.java:850) at com.intellij.codeInsight.completion.CompletionProgressIndicator.runContributors(CompletionProgressIndicator.java:838) at com.intellij.codeInsight.completion.CodeCompletionHandlerBase.lambda$startContributorThread$6(CodeCompletionHandlerBase.java:352) at com.intellij.codeInsight.completion.AsyncCompletion.lambda$tryReadOrCancel$5(CompletionThreading.java:172) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1110) at com.intellij.codeInsight.completion.AsyncCompletion.tryReadOrCancel(CompletionThreading.java:170) at com.intellij.codeInsight.completion.CodeCompletionHandlerBase.lambda$startContributorThread$7(CodeCompletionHandlerBase.java:344) at com.intellij.codeInsight.completion.AsyncCompletion.lambda$startThread$0(CompletionThreading.java:95) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:170) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:629) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:581) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60) at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:157) at com.intellij.codeInsight.completion.AsyncCompletion.lambda$startThread$1(CompletionThreading.java:91) at com.intellij.util.RunnableCallable.call(RunnableCallable.java:20) at com.intellij.util.RunnableCallable.call(RunnableCallable.java:11) at com.intellij.openapi.application.impl.ApplicationImpl$1.call(ApplicationImpl.java:268) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665) at java.base/java.lang.Thread.run(Thread.java:834) ``` </details> 5863: Fix `invalidate caches / restart` on 203 r=vlad20012 a=vlad20012 Fixes this exception: <details> <summary>Stacktrace</summary> ``` java.lang.NoSuchMethodError: 'void com.intellij.util.io.PathKt.createFile(java.nio.file.Path)' at org.rust.lang.core.macros.MacroExpansionManager$Companion.invalidateCaches(MacroExpansionManager.kt:92) at org.rust.lang.core.macros.RsMacroExpansionCachesInvalidator.invalidateCaches(RsMacroExpansionCachesInvalidator.kt:13) at com.intellij.ide.actions.InvalidateCachesAction.actionPerformed(InvalidateCachesAction.java:91) at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:282) at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.lambda$actionPerformed$0(ActionMenuItem.java:311) at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:281) at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:77) at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:300) at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967) at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$fireActionPerformed$0(ActionMenuItem.java:113) at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:94) at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:113) at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:514) at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:36) at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:544) at java.desktop/java.awt.Component.processMouseEvent(Component.java:6654) at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3345) at java.desktop/java.awt.Component.processEvent(Component.java:6419) at java.desktop/java.awt.Container.processEvent(Container.java:2263) at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5029) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4861) at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918) at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547) at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307) at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2773) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4861) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:778) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95) at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:751) at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:749) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:748) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:973) at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.java:908) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:840) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:454) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:768) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:453) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:803) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:507) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90) ``` </details> // do not mention in changelog since it's 203-related Co-authored-by: vlad20012 <beskvlad@gmail.com>

view details

Aleksei Trifonov

commit sha d8b18f7b954a449b3006fa38badf235fbb231bec

PRJ: Implement project generation with cargo-generate

view details

push time in 2 months

PR opened rust-lang/backtrace-rs

Delegate, don't duplicate

Duplication introduced in 4b8f2be2.

r? @alexcrichton cc @eggyal

+1 -10

0 comment

1 changed file

pr created time in 2 months

create barnchtamird/backtrace-rs

branch : dedup

created branch time in 2 months

Pull request review commentintellij-rust/intellij-rust

Fix compiler warnings

 class SourceFile(         checkIsSmartMode(project)          val isExpansionFile = MacroExpansionManager.isExpansionFile(file)-        val isIndexedFile = file.isValid && (-            FileBasedIndexScanRunnableCollector.getInstance(project).shouldCollect(file) || isExpansionFile)+        val isIndexedFile = file.isValid && (isExpansionFile || ProjectFileIndex.getInstance(project).let {

What's so bad about let? FWIW I'm not really sure the logic here is correct; I just copied what was being done in FileBasedIndexScanRunnableCollector.

tamird

comment created time in 2 months

Pull request review commentintellij-rust/intellij-rust

Fix compiler warnings

 import org.rust.lang.utils.evaluation.evaluate class RsErrorAnnotator : AnnotatorBase(), HighlightRangeExtension {     override fun isForceHighlightParents(file: PsiFile): Boolean = file is RsFile -    override fun annotateInternal(element: PsiElement, rawHolder: AnnotationHolder) {-        val holder = RsAnnotationHolder(rawHolder)-        val visitor = object : RsVisitor() {-            override fun visitBaseType(o: RsBaseType) = checkBaseType(holder, o)-            override fun visitCondition(o: RsCondition) = checkCondition(holder, o)-            override fun visitConstant(o: RsConstant) = checkConstant(holder, o)-            override fun visitTypeArgumentList(o: RsTypeArgumentList) = checkTypeArgumentList(holder, o)-            override fun visitValueParameterList(o: RsValueParameterList) = checkValueParameterList(holder, o)-            override fun visitValueArgumentList(o: RsValueArgumentList) = checkValueArgumentList(holder, o)-            override fun visitStructItem(o: RsStructItem) = checkDuplicates(holder, o)-            override fun visitEnumItem(o: RsEnumItem) = checkEnumItem(holder, o)-            override fun visitEnumVariant(o: RsEnumVariant) = checkEnumVariant(holder, o)-            override fun visitFunction(o: RsFunction) = checkFunction(holder, o)-            override fun visitImplItem(o: RsImplItem) = checkImpl(holder, o)-            override fun visitLabel(o: RsLabel) = checkLabel(holder, o)-            override fun visitLifetime(o: RsLifetime) = checkLifetime(holder, o)-            override fun visitModDeclItem(o: RsModDeclItem) = checkModDecl(holder, o)-            override fun visitModItem(o: RsModItem) = checkDuplicates(holder, o)-            override fun visitUseSpeck(o: RsUseSpeck) = checkUseSpeck(holder, o)-            override fun visitPatBox(o: RsPatBox) = checkPatBox(holder, o)-            override fun visitPatField(o: RsPatField) = checkPatField(holder, o)-            override fun visitPatBinding(o: RsPatBinding) = checkPatBinding(holder, o)-            override fun visitPatRest(o: RsPatRest) = checkPatRest(holder, o)-            override fun visitOrPat(o: RsOrPat) = checkOrPat(holder, o)-            override fun visitPath(o: RsPath) = checkPath(holder, o)-            override fun visitNamedFieldDecl(o: RsNamedFieldDecl) = checkDuplicates(holder, o)-            override fun visitRetExpr(o: RsRetExpr) = checkRetExpr(holder, o)-            override fun visitTraitItem(o: RsTraitItem) = checkDuplicates(holder, o)-            override fun visitTypeAlias(o: RsTypeAlias) = checkTypeAlias(holder, o)-            override fun visitTypeParameter(o: RsTypeParameter) = checkDuplicates(holder, o)-            override fun visitConstParameter(o: RsConstParameter) = checkConstParameter(holder, o)-            override fun visitLifetimeParameter(o: RsLifetimeParameter) = checkLifetimeParameter(holder, o)-            override fun visitVis(o: RsVis) = checkVis(holder, o)-            override fun visitVisRestriction(o: RsVisRestriction) = checkVisRestriction(holder, o)-            override fun visitUnaryExpr(o: RsUnaryExpr) = checkUnary(holder, o)-            override fun visitBinaryExpr(o: RsBinaryExpr) = checkBinary(holder, o)-            override fun visitExternCrateItem(o: RsExternCrateItem) = checkExternCrate(holder, o)-            override fun visitDotExpr(o: RsDotExpr) = checkDotExpr(holder, o)-            override fun visitYieldExpr(o: RsYieldExpr) = checkYieldExpr(holder, o)-            override fun visitArrayType(o: RsArrayType) = checkArrayType(holder, o)-            override fun visitArrayExpr(o: RsArrayExpr) = checkArrayExpr(holder, o)-            override fun visitVariantDiscriminant(o: RsVariantDiscriminant) = collectDiagnostics(holder, o)-            override fun visitPolybound(o: RsPolybound) = checkPolybound(holder, o)-            override fun visitTraitRef(o: RsTraitRef) = checkTraitRef(holder, o)-            override fun visitCallExpr(o: RsCallExpr) = checkCallExpr(holder, o)-            override fun visitBlockExpr(o: RsBlockExpr) = checkBlockExpr(holder, o)-            override fun visitBreakExpr(o: RsBreakExpr) = checkBreakExpr(holder, o)-            override fun visitContExpr(o: RsContExpr) = checkContExpr(holder, o)-            override fun visitAttr(o: RsAttr) = checkAttr(holder, o)-            override fun visitRangeExpr(o: RsRangeExpr) = checkRangeExpr(holder, o)-            override fun visitTraitType(o: RsTraitType) = checkTraitType(holder, o)-            override fun visitSelfParameter(o: RsSelfParameter) = checkParamAttrs(holder, o)-            override fun visitValueParameter(o: RsValueParameter) = checkParamAttrs(holder, o)-            override fun visitVariadic(o: RsVariadic) = checkParamAttrs(holder, o)-            override fun visitPatStruct(o: RsPatStruct) = checkRsPatStruct(holder, o)-            override fun visitPatTupleStruct(o: RsPatTupleStruct) = checkRsPatTupleStruct(holder, o)-            override fun visitStructLiteralField(o: RsStructLiteralField) = checkReferenceIsPublic(o, o, holder)-        }--        element.accept(visitor)+    override fun annotateInternal(element: PsiElement, holder: AnnotationHolder) {+        RsAnnotationHolder(holder).let {+            object : RsVisitor() {+                override fun visitBaseType(o: RsBaseType) = checkBaseType(it, o)+                override fun visitCondition(o: RsCondition) = checkCondition(it, o)+                override fun visitConstant(o: RsConstant) = checkConstant(it, o)+                override fun visitTypeArgumentList(o: RsTypeArgumentList) = checkTypeArgumentList(it, o)+                override fun visitValueParameterList(o: RsValueParameterList) = checkValueParameterList(it, o)+                override fun visitValueArgumentList(o: RsValueArgumentList) = checkValueArgumentList(it, o)+                override fun visitStructItem(o: RsStructItem) = checkDuplicates(it, o)+                override fun visitEnumItem(o: RsEnumItem) = checkEnumItem(it, o)+                override fun visitEnumVariant(o: RsEnumVariant) = checkEnumVariant(it, o)+                override fun visitFunction(o: RsFunction) = checkFunction(it, o)+                override fun visitImplItem(o: RsImplItem) = checkImpl(it, o)+                override fun visitLabel(o: RsLabel) = checkLabel(it, o)+                override fun visitLifetime(o: RsLifetime) = checkLifetime(it, o)+                override fun visitModDeclItem(o: RsModDeclItem) = checkModDecl(it, o)+                override fun visitModItem(o: RsModItem) = checkDuplicates(it, o)+                override fun visitUseSpeck(o: RsUseSpeck) = checkUseSpeck(it, o)+                override fun visitPatBox(o: RsPatBox) = checkPatBox(it, o)+                override fun visitPatField(o: RsPatField) = checkPatField(it, o)+                override fun visitPatBinding(o: RsPatBinding) = checkPatBinding(it, o)+                override fun visitPatRest(o: RsPatRest) = checkPatRest(it, o)+                override fun visitOrPat(o: RsOrPat) = checkOrPat(it, o)+                override fun visitPath(o: RsPath) = checkPath(it, o)+                override fun visitNamedFieldDecl(o: RsNamedFieldDecl) = checkDuplicates(it, o)+                override fun visitRetExpr(o: RsRetExpr) = checkRetExpr(it, o)+                override fun visitTraitItem(o: RsTraitItem) = checkDuplicates(it, o)+                override fun visitTypeAlias(o: RsTypeAlias) = checkTypeAlias(it, o)+                override fun visitTypeParameter(o: RsTypeParameter) = checkDuplicates(it, o)+                override fun visitConstParameter(o: RsConstParameter) = checkConstParameter(it, o)+                override fun visitLifetimeParameter(o: RsLifetimeParameter) = checkLifetimeParameter(it, o)+                override fun visitVis(o: RsVis) = checkVis(it, o)+                override fun visitVisRestriction(o: RsVisRestriction) = checkVisRestriction(it, o)+                override fun visitUnaryExpr(o: RsUnaryExpr) = checkUnary(it, o)+                override fun visitBinaryExpr(o: RsBinaryExpr) = checkBinary(it, o)+                override fun visitExternCrateItem(o: RsExternCrateItem) = checkExternCrate(it, o)+                override fun visitDotExpr(o: RsDotExpr) = checkDotExpr(it, o)+                override fun visitYieldExpr(o: RsYieldExpr) = checkYieldExpr(it, o)+                override fun visitArrayType(o: RsArrayType) = checkArrayType(it, o)+                override fun visitArrayExpr(o: RsArrayExpr) = checkArrayExpr(it, o)+                override fun visitVariantDiscriminant(o: RsVariantDiscriminant) = collectDiagnostics(it, o)+                override fun visitPolybound(o: RsPolybound) = checkPolybound(it, o)+                override fun visitTraitRef(o: RsTraitRef) = checkTraitRef(it, o)+                override fun visitCallExpr(o: RsCallExpr) = checkCallExpr(it, o)+                override fun visitBlockExpr(o: RsBlockExpr) = checkBlockExpr(it, o)+                override fun visitBreakExpr(o: RsBreakExpr) = checkBreakExpr(it, o)+                override fun visitContExpr(o: RsContExpr) = checkContExpr(it, o)+                override fun visitAttr(o: RsAttr) = checkAttr(it, o)+                override fun visitRangeExpr(o: RsRangeExpr) = checkRangeExpr(it, o)+                override fun visitTraitType(o: RsTraitType) = checkTraitType(it, o)+                override fun visitSelfParameter(o: RsSelfParameter) = checkParamAttrs(it, o)+                override fun visitValueParameter(o: RsValueParameter) = checkParamAttrs(it, o)+                override fun visitVariadic(o: RsVariadic) = checkParamAttrs(it, o)+                override fun visitPatStruct(o: RsPatStruct) = checkRsPatStruct(it, o)+                override fun visitPatTupleStruct(o: RsPatTupleStruct) = checkRsPatTupleStruct(it, o)+                override fun visitStructLiteralField(o: RsStructLiteralField) = checkReferenceIsPublic(o, o, it)+            }+        }.let(element::accept)

Well, initially I had a local variable here, but I ran into some version of this bug: https://youtrack.jetbrains.com/issue/KT-29595

The only way I could make it work was using this let form.

tamird

comment created time in 2 months

pull request commentintellij-rust/intellij-rust

Fix compiler warnings

(fixed now to stay compatible with 201)

tamird

comment created time in 2 months

push eventtamird/intellij-rust

Tamir Duberstein

commit sha 9ccf19b27e65ab624361b58d03cebb2da7d9cccf

Avoid deprecated DigestUtil function w: src/main/kotlin/org/rust/lang/core/macros/VfsInternals.kt: (45, 43): 'calculateContentHash(MessageDigest, ByteArray): ByteArray' is deprecated. Current implementation is very specific: it mixes length of the array to the hash. In general, it is enough to hash only bytes of the array. Implement the hashing yourself. Also make sure that you create new or reset the MessageDigest

view details

push time in 2 months

push eventtamird/intellij-rust

Tamir Duberstein

commit sha 7896fafd956ec999311a8c39409b1b8bed8ccf0e

Match supertype parameter names w: src/main/kotlin/org/rust/ide/annotator/RsErrorAnnotator.kt: (51, 56): The corresponding parameter in the supertype 'AnnotatorBase' is named 'holder'. This may cause problems when calling this function with named arguments. w: src/main/kotlin/org/rust/ide/spelling/RsSpellCheckerDictionaryGenerator.kt: (22, 39): The corresponding parameter in the supertype 'RsRecursiveVisitor' is named 'o'. This may cause problems when calling this function with named arguments.

view details

Tamir Duberstein

commit sha df5aa38fd016aebecddc32862bb62b6b7664c1ea

Avoid FileBasedIndexScanRunnableCollector w: src/main/kotlin/org/rust/lang/core/macros/ExpandedMacroStorage.kt: (25, 35): 'FileBasedIndexScanRunnableCollector' is deprecated. Deprecated in Java w: src/main/kotlin/org/rust/lang/core/macros/ExpandedMacroStorage.kt: (503, 13): 'FileBasedIndexScanRunnableCollector' is deprecated. Deprecated in Java w: src/main/kotlin/org/rust/lang/core/macros/ExpandedMacroStorage.kt: (503, 70): 'shouldCollect(VirtualFile): Boolean' is deprecated. Deprecated in Java

view details

push time in 2 months

push eventtamird/intellij-rust

Tamir Duberstein

commit sha adbde0b990da28e8f803f1e72842052d1d3add83

Avoid deprecated DigestUtil function w: src/main/kotlin/org/rust/lang/core/macros/VfsInternals.kt: (45, 43): 'calculateContentHash(MessageDigest, ByteArray): ByteArray' is deprecated. Current implementation is very specific: it mixes length of the array to the hash. In general, it is enough to hash only bytes of the array. Implement the hashing yourself. Also make sure that you create new or reset the MessageDigest

view details

Tamir Duberstein

commit sha 8cfe46ad7280f648d392d5834019bb7503bf1da9

Avoid FileBasedIndexScanRunnableCollector w: src/main/kotlin/org/rust/lang/core/macros/ExpandedMacroStorage.kt: (25, 35): 'FileBasedIndexScanRunnableCollector' is deprecated. Deprecated in Java w: src/main/kotlin/org/rust/lang/core/macros/ExpandedMacroStorage.kt: (503, 13): 'FileBasedIndexScanRunnableCollector' is deprecated. Deprecated in Java w: src/main/kotlin/org/rust/lang/core/macros/ExpandedMacroStorage.kt: (503, 70): 'shouldCollect(VirtualFile): Boolean' is deprecated. Deprecated in Java

view details

Tamir Duberstein

commit sha 3f4d280effb2ea795651f473d5a201147937b682

Match supertype parameter names w: src/main/kotlin/org/rust/ide/annotator/RsErrorAnnotator.kt: (51, 56): The corresponding parameter in the supertype 'AnnotatorBase' is named 'holder'. This may cause problems when calling this function with named arguments. w: src/main/kotlin/org/rust/ide/spelling/RsSpellCheckerDictionaryGenerator.kt: (22, 39): The corresponding parameter in the supertype 'RsRecursiveVisitor' is named 'o'. This may cause problems when calling this function with named arguments.

view details

push time in 2 months

push eventtamird/intellij-rust

vlad20012

commit sha 44e3375d83b2230e0a01e34587352a9a6211e859

TY: infer type parameters from assoc type bindings E.g. correctly infer `B` from `A: Foo` in this case: ``` trait Foo { type Item; } fn foo<A, B>(a: A) -> B where A: Foo<Item = B> ``` This fixes type inference for `Iterator.cloned()`

view details

bors[bot]

commit sha cf1fef617fbe6e91832a220561460fd3f0f97042

Merge #5841 5841: TY: infer type parameters from assoc type bindings r=mchernyavsky a=vlad20012 E.g. correctly infer `B` from `A: Foo` in this case: ```rust trait Foo { type Item; } fn foo<A, B>(a: A) -> B where A: Foo<Item = B> ``` Fixes #4505 type inference for `Iterator.cloned()` Co-authored-by: vlad20012 <beskvlad@gmail.com>

view details

Arseniy Pendryak

commit sha bf7a1f6ce2dccccd374b9dc4c233d9f6670919da

#5551: properly extract text from lifetimes for spellchecker

view details

Arseniy Pendryak

commit sha b35b2cef87f4bc6f9a308d1aebafcf6002b3aa50

T: use `RsInspectionsTestBase` for spell checker tests

view details

bors[bot]

commit sha 2d6ca5c974d8b3ced59af0e57b1923ed2ed753d0

Merge #5856 5856: Properly check spelling in lifetimes r=mchernyavsky a=Undin These changes fix text extraction from lifetime identifiers for spell checking and fix false-positive typo annotations in lifetimes like `'static` Fixes #5551 Co-authored-by: Arseniy Pendryak <a.pendryak@yandex.ru>

view details

Jakub Beránek

commit sha 1feac4e4afa39dc62f4615e56828f0d06d48e425

RUN: fold external stack traces

view details

bors[bot]

commit sha 74cdb9b1dfad8390e94b8051ba79cb147221a8f4

Merge #5747 5747: RUN: fold external stack traces r=undin a=Kobzol This PR adds folding for non-project related stacktraces: ![image](https://user-images.githubusercontent.com/4539057/87586389-c2b77b80-c6e0-11ea-9e98-9bc8f7b89801.png) The implementation needs some refactoring, I first wanted to do a sanity check if you think that this approach is valid. The console folder is a non-dynamic extension, is there a dynamic alternative? Related issue: https://github.com/intellij-rust/intellij-rust/issues/4514 Co-authored-by: Jakub Beránek <berykubik@gmail.com>

view details

Tamir Duberstein

commit sha 6e23ffc5823314b58e6d03118d0d821f50065b42

Match supertype parameter names w: src/main/kotlin/org/rust/ide/annotator/RsErrorAnnotator.kt: (51, 56): The corresponding parameter in the supertype 'AnnotatorBase' is named 'holder'. This may cause problems when calling this function with named arguments. w: src/main/kotlin/org/rust/ide/spelling/RsSpellCheckerDictionaryGenerator.kt: (22, 39): The corresponding parameter in the supertype 'RsRecursiveVisitor' is named 'o'. This may cause problems when calling this function with named arguments.

view details

Tamir Duberstein

commit sha 5ae004ed3e3fedd43552bb2b1c36ed3b092c5d29

Avoid deprecated DigestUtil function w: src/main/kotlin/org/rust/lang/core/macros/VfsInternals.kt: (45, 43): 'calculateContentHash(MessageDigest, ByteArray): ByteArray' is deprecated. Current implementation is very specific: it mixes length of the array to the hash. In general, it is enough to hash only bytes of the array. Implement the hashing yourself. Also make sure that you create new or reset the MessageDigest

view details

Tamir Duberstein

commit sha c1e16bc22c8a45c71586b3dfdc0849507aaef385

Avoid FileBasedIndexScanRunnableCollector w: src/main/kotlin/org/rust/lang/core/macros/ExpandedMacroStorage.kt: (25, 35): 'FileBasedIndexScanRunnableCollector' is deprecated. Deprecated in Java w: src/main/kotlin/org/rust/lang/core/macros/ExpandedMacroStorage.kt: (503, 13): 'FileBasedIndexScanRunnableCollector' is deprecated. Deprecated in Java w: src/main/kotlin/org/rust/lang/core/macros/ExpandedMacroStorage.kt: (503, 70): 'shouldCollect(VirtualFile): Boolean' is deprecated. Deprecated in Java

view details

push time in 2 months

delete branch tamird/intellij-rust

delete branch : deprecations

delete time in 2 months

PR opened intellij-rust/intellij-rust

Fix compiler warnings

Best to review commit-by-commit, since they each fix different issues.

With these changes, it is almost possible to set allWarningsAsErrors = true. Remaining warnings I didn't know how to fix:

w: src/main/kotlin/org/rust/ide/inspections/RsRedundantElseInspection.kt: (62, 24): 'patList: List<RsPat>?' is deprecated. Support `RsOrPat`
w: src/main/kotlin/org/rust/ide/inspections/checkMatch/CheckMatchUtils.kt: (46, 26): 'patList: List<RsPat>' is deprecated. Support `RsOrPat`
w: src/main/kotlin/org/rust/ide/inspections/checkMatch/RsMatchCheckInspection.kt: (53, 43): 'patList: List<RsPat>' is deprecated. Support `RsOrPat`
w: src/main/kotlin/org/rust/ide/inspections/checkMatch/RsMatchCheckInspection.kt: (62, 31): 'patList: List<RsPat>' is deprecated. Support `RsOrPat`
w: src/main/kotlin/org/rust/lang/core/cfg/CFGBuilder.kt: (175, 31): 'patList: List<RsPat>?' is deprecated. Support `RsOrPat`
w: src/main/kotlin/org/rust/lang/core/cfg/CFGBuilder.kt: (594, 17): 'patList: List<RsPat>' is deprecated. Support `RsOrPat`
w: src/main/kotlin/org/rust/lang/core/types/borrowck/ExprUseWalker.kt: (385, 31): 'patList: List<RsPat>?' is deprecated. Support `RsOrPat`
w: src/main/kotlin/org/rust/lang/core/types/borrowck/ExprUseWalker.kt: (447, 13): 'patList: List<RsPat>' is deprecated. Support `RsOrPat`
w: src/main/kotlin/org/rust/lang/core/types/borrowck/ExprUseWalker.kt: (452, 13): 'patList: List<RsPat>' is deprecated. Support `RsOrPat`

cc @Undin who introduced this (and fixed many instances) in d30be52fb5ca1ceddb907deb55ee8593948ccd89.

+81 -72

0 comment

7 changed files

pr created time in 2 months

create barnchtamird/intellij-rust

branch : warnings

created branch time in 2 months

create barnchtamird/intellij-rust

branch : deprecations

created branch time in 2 months

delete branch tamird/intellij-rust

delete branch : rustc-path-cargo

delete time in 2 months

delete branch tamird/intellij-rust

delete branch : kt-warning

delete time in 2 months

Pull request review commentintellij-rust/intellij-rust

[CARGO] Include RUSTC in environment

 class CargoTest : RsTestBase() {     fun `test run arguments preserved`() = checkCommandLine(         cargo.toColoredCommandLine(project, CargoCommandLine("run", wd, listOf("--bin", "parity", "--", "--prune", "archive"))), """         cmd: /usr/bin/cargo run --color=always --bin parity -- --prune archive-        env: RUST_BACKTRACE=short, TERM=ansi+        env: RUSTC=/usr/bin/rustc, RUST_BACKTRACE=short, TERM=ansi         """, """         cmd: C:/usr/bin/cargo.exe run --color=always --bin parity -- --prune archive-        env: RUST_BACKTRACE=short, TERM=ansi+        env: RUSTC=/usr/bin/rustc, RUST_BACKTRACE=short, TERM=ansi

Done, thanks!

tamird

comment created time in 2 months

push eventtamird/intellij-rust

Tamir Duberstein

commit sha c5119f72f6de4a1d6245e2cdc15cfae783b22394

[CARGO] Silence always-false condition warning w: intellij-rust/src/main/kotlin/org/rust/cargo/toolchain/Cargo.kt: (142, 13): Condition 'workspaceRoot == null' is always 'false'

view details

bors[bot]

commit sha f7735715f6fdc4552d693ea001336874d8dbc54b

Merge #5848 5848: [CARGO] Silence always-false condition warning r=mchernyavsky a=tamird w: intellij-rust/src/main/kotlin/org/rust/cargo/toolchain/Cargo.kt: (142, 13): Condition 'workspaceRoot == null' is always 'false' Co-authored-by: Tamir Duberstein <tamird@gmail.com>

view details

Tamir Duberstein

commit sha 5c372a72655f784daeb98ba5bbd71582cb99ba47

[CARGO] Include RUSTC in environment Fixes #5843.

view details

push time in 2 months

issue commentintellij-rust/intellij-rust

toolchain location not included in PATH passed to cargo

@Kobzol thanks. I've sent a PR to try to solve this more generally.

tamird

comment created time in 2 months

PR opened intellij-rust/intellij-rust

[CARGO] Include RUSTC in environment

Fixes #5843.

+21 -20

0 comment

4 changed files

pr created time in 2 months

PR opened intellij-rust/intellij-rust

[CARGO] Silence always-false condition warning

w: intellij-rust/src/main/kotlin/org/rust/cargo/toolchain/Cargo.kt: (142, 13): Condition 'workspaceRoot == null' is always 'false'

+2 -1

0 comment

2 changed files

pr created time in 2 months

push eventtamird/intellij-rust

Tamir Duberstein

commit sha 11f527d535383fa980348aa8422f1358b2e9a4d9

[CARGO] Include RUSTC in environment Fixes #5843.

view details

push time in 2 months

push eventtamird/intellij-rust

Tamir Duberstein

commit sha c5119f72f6de4a1d6245e2cdc15cfae783b22394

[CARGO] Silence always-false condition warning w: intellij-rust/src/main/kotlin/org/rust/cargo/toolchain/Cargo.kt: (142, 13): Condition 'workspaceRoot == null' is always 'false'

view details

push time in 2 months

push eventtamird/intellij-rust

Tamir Duberstein

commit sha fc6ab6c6afe8d407be03689a8a5465671195838c

[CARGO] Silence always-false condition warning w: intellij-rust/src/main/kotlin/org/rust/cargo/toolchain/Cargo.kt: (142, 13): Condition 'workspaceRoot == null' is always 'false'

view details

push time in 2 months

push eventtamird/intellij-rust

Tamir Duberstein

commit sha a55ed9406470521f05fa7be7591dcf7f476d9f73

[CARGO] Include RUSTC in environment Fixes #5843.

view details

push time in 2 months

create barnchtamird/intellij-rust

branch : rustc-path-cargo

created branch time in 2 months

create barnchtamird/intellij-rust

branch : kt-warning

created branch time in 2 months

fork tamird/intellij-rust

Rust plugin for the IntelliJ Platform: https://intellij-rust.github.io/

fork in 2 months

issue commentintellij-rust/intellij-rust

toolchain location not included in PATH passed to cargo

@mchernyavsky thanks for the response! I think that setting only affects my configurations. This bug is about the plugin itself attempting to invoke cargo and failing. My event log still shows:

6:58 PM	Cargo project update failed:
							Execution failed (exit code 101).
							        /usr/local/google/home/tamird/src/fuchsia/prebuilt/third_party/rust/linux-x64/bin/cargo metadata --verbose --format-version 1 --all-features
							        stdout : error: could not execute process `rustc -vV` (never executed)
							
							Caused by:
							  No such file or directory (os error 2)
							
							        stderr : 

tamird

comment created time in 2 months

issue openedintellij-rust/intellij-rust

toolchain location not included in PATH passed to cargo

Hello! We are big fans of this plugin in Fuchsia.

In Fuchsia, we use self-contained rust toolchains, which means that our cargo, rustc, etc. are not usually in our PATH. This seems to be a problem for this plugin because cargo is executed with intellij's PATH, and is then unable to find rustc.

Would it be possible to execute cargo with the toolchain location (specified in the plugin's settings) appended to PATH?

cc @brunowonka

created time in 2 months

Pull request review commentrust-lang/rust

Change `SymbolName::name` to a `&str`.

 symbols! {         rustc_unsafe_specialization_marker,         rustc_variance,         rust_eh_personality,

should this have been removed?

nnethercote

comment created time in 2 months

delete branch tamird/rust

delete branch : blocklist

delete time in 2 months

delete branch tamird/rust

delete branch : allowlist

delete time in 2 months

pull request commentrust-lang/rust

Avoid "whitelist"

@oli-obk done.

tamird

comment created time in 2 months

push eventtamird/rust

Alexis Bourget

commit sha 049f6eaa792fbbf2b727fc278ddd23d1e11d57bd

Fixing broken link for the Eq trait

view details

Eduard-Mihai Burtescu

commit sha f25811e34bf89c3dde760d826ad4662c245be202

Replace early-bound normalization hack with per-query key/value type aliases.

view details

Eduard-Mihai Burtescu

commit sha f07100afc8650101ac924d728521e1a5d0ce9080

Use for<'tcx> fn pointers in Providers, instead of having Providers<'tcx>.

view details

Seth Pellegrino

commit sha 81fbfc40594e0c74aa46bbf50225c4d923f1464b

Use relative path for local links to primitives in libcore Else, links to `char::foo` would point into `/path/to/src/libcore/std/primitive.char.html#method.foo`. Split out from #73804.

view details

Seth Pellegrino

commit sha ee3a0f867e938f469cbbb422a76ed5662be2ecc7

Add guard to check for local `core` crate

view details

Gary Guo

commit sha e0b69f207b276e0432e45bbe41d26a28bbfbfa2e

Hide `&mut self` methods from Deref in sidebar If there are no `DerefMut` impl for the type.

view details

Gary Guo

commit sha 368aa6f1e292d264bcb74fafa25069fe19c49450

Add test for issue 74083

view details

Seth Pellegrino

commit sha 33a5d00efb4347736dd766c06cb9e0bcc0d6c377

Two new rustdoc tests for intra links They both produce less-than-desirable output (links going to docs.rust-lang.org), but I haven't figured out yet how to assert about them properly.

view details

Seth Pellegrino

commit sha 165aecbee31c3e628aaa8e6e7edbbd113f46e3f2

build extern docs as well

view details

Seth Pellegrino

commit sha 865b930bc99680bd170a677c095a2116a5c4159d

Assert current behavior for links For the two of these tests that have a local `char` to link to, this behavior isn't what's expected, but is what's happening presently.

view details

Oliver Middleton

commit sha 56fb71786a77706cefec8170bd06a5c990493b2b

rustdoc: Rename invalid_codeblock_attribute lint to be plural

view details

Seth Pellegrino

commit sha f258d98f65ef1408a6045f5ca7873371720409c2

ignore-tidy-linelength for @has assertions

view details

Seth Pellegrino

commit sha 8d267db31a767f22f07e06439ae682329c22bef1

Revert "Add guard to check for local `core` crate" This reverts commit ee3a0f867e938f469cbbb422a76ed5662be2ecc7.

view details

Yuki Okushi

commit sha dd077746174b7ddbbd004b47f475c46cda3b5f27

Fix broken link in rustdocdoc

view details

Ivan Tham

commit sha 7bc85e29c94084a5b24af4b38a6d9dd7f9177f06

Liballoc use vec instead of vector Keep congruency with other parts, full word vector is rarely used.

view details

Ivan Tham

commit sha 09654430017b9ed8488ca45c414410af1417a482

Remove unneeded ToString import in liballoc slice

view details

Seth Pellegrino

commit sha 9366458c58a60b9573f45f1c407bd4c7f2fa1876

Apply #![crate_type = "rlib"] directly to the linker

view details

Eric Huss

commit sha 26353eae4c1454cad27e4af26c664c0048312668

Fix x.py test for librustc crates.

view details

Tamir Duberstein

commit sha 1e567c11686f20b4e7422ba9cc0f1eac45e9c9fb

Avoid "blacklist" Other terms are more inclusive and precise. Clippy still has a lint named "blacklisted-name", but renaming it would be a breaking change, so is left for future work. The target configuration option "abi-blacklist" has been depreciated and renamed to "unsupported-abis". The old name continues to work.

view details

Seth Pellegrino

commit sha 56b6b44641f0dc999a63b478c93af5279ad7464f

Avoid running test on Windows platforms There don't seem to be any other compiletests that are 1) building a standalone "no_core" create and then 2) trying to link against it. There seems to be a platform-specific limitation in doing so: ``` 2020-07-08T16:07:42.9419409Z = note: Creating library D:\a\rust\rust\build\i686-pc-windows-msvc\test\rustdoc\intra-link-prim-methods-external-core\auxiliary\my_core.dll.lib and object D:\a\rust\rust\build\i686-pc-windows-msvc\test\rustdoc\intra-link-prim-methods-external-core\auxiliary\my_core.dll.exp 2020-07-08T16:07:42.9419810Z LINK : error LNK2001: unresolved external symbol __DllMainCRTStartup@12 2020-07-08T16:07:42.9420032Z D:\a\rust\rust\build\i686-pc-windows-msvc\test\rustdoc\intra-link-prim-methods-external-core\auxiliary\my_core.dll : fatal error LNK1120: 1 unresolved externals ``` Possibly this could be resolved by adding a `__DllMainCRTStartup` or `__DllMainCRTStartup@12` symbol in an architecture- and platform-specific way.

view details

push time in 2 months

pull request commentrust-lang/rust

Avoid "whitelist"

Minor amendment to fix a whitespace issue.

tamird

comment created time in 3 months

push eventtamird/rust

Tamir Duberstein

commit sha 48d7318d75a6b396e5592579c8cf7042647f82bf

Avoid "whitelist" Other terms are more inclusive and precise.

view details

push time in 3 months

pull request commentrust-lang/rust

Avoid "whitelist"

I'd be happy to, but I won't do it in this venue. Feel free to reach out, I'm not hard to find.

tamird

comment created time in 3 months

pull request commentrust-lang/rust

Avoid "whitelist"

I'm happy to address your concerns case-by-case. Without commenting on whether or not the statement that "whitelist/blacklist widely accepted across the globe" is true, the position I'm taking in this PR is that those terms are no longer accepted by me, and the position taken by the compiler team seems to be that the terms I've replaced them with in this PR are better.

Again, I've incorporated all the feedback regarding specific terms that were suboptimal, and I welcome more feedback of that sort. I've done my best to avoid objectively bad substitutes like "allowlist" in this PR.

tamird

comment created time in 3 months

Pull request review commentrust-lang/rust

Avoid "whitelist"

 declare_clippy_lint! {     /// **Known problems:** False negatives: We had some false positives regarding     /// calls (notably [racer](https://github.com/phildawes/racer) had one instance     /// of `x.pop() && x.pop()`), so we removed matching any function or method-    /// calls. We may introduce a whitelist of known pure functions in the future.+    /// calls. We may introduce an list of known pure functions in the future.

Done.

tamird

comment created time in 3 months

Pull request review commentrust-lang/rust

Avoid "whitelist"

 fn verify<'tcx>(tcx: TyCtxt<'tcx>, items: &lang_items::LanguageItems) {     }      for (name, &item) in WEAK_ITEMS_REFS.iter() {-        if missing.contains(&item) && !whitelisted(tcx, item) && items.require(item).is_err() {+        if missing.contains(&item) && !not_required(tcx, item) && items.require(item).is_err() {

Done.

tamird

comment created time in 3 months

Pull request review commentrust-lang/rust

Avoid "whitelist"

 from subprocess import PIPE, Popen  -# This is a whitelist of files which are stable crates or simply are not crates,+# This is an list of files which are stable crates or simply are not crates,

Done.

tamird

comment created time in 3 months

push eventtamird/rust

Tamir Duberstein

commit sha 7c6a78f4667d3d286537c1e43151394fcb0a28ac

Avoid "whitelist" Other terms are more inclusive and precise.

view details

push time in 3 months

push eventtamird/rust

Rich Kadel

commit sha e4df7e70466611a49d3ff6c49d162b2045173449

Update src/libcore/intrinsics.rs Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com>

view details

Rich Kadel

commit sha 7e49a9ec59f7950efa9950b65c10f9b3f3a4b6b2

moved to post_borrowck_cleanup & used MirPatch

view details

Rich Kadel

commit sha 46ebd57c42439b3aedcb160f70b022a4f59f4afa

moved instrument_coverage pass, optimized scalar, added FIXME

view details

Rich Kadel

commit sha 20aba8f634c13fa2bb1b043b51a074769dc06f66

added test, Operand::const_from_scalar, require_lang_item, & comments Addresses feedback from @oli-obk (Thanks!)

view details

Rich Kadel

commit sha 163e5854562f5274f092d66318a5c805e18d83c5

updated mir-opt test due to other recent changes to MIR

view details

Rich Kadel

commit sha 98685a4bf2ef50c6d6a64ef3867a29994d5a4a25

Add new `fn_span` to TerminatorKind::Call instance

view details

Wesley Wiser

commit sha c06876c90437c7eecd1dc246d3515d6211397f16

[const-prop] Remove `ConstPropMode::NoPropagation` This mode is unnecessary because it's always ok to evaluate the right-hand side of assignments even if the left-hand side should not have reads propagated.

view details

Wesley Wiser

commit sha 2f49d554ff1afd1633a01d6b84192ad0147d9097

Add EMIR_MIR_FOR_EACH_BIT_WIDTH to failing test

view details

Lzu Tao

commit sha 0e6c333ca61d3f04ad142a2929d03cb8ecd2a706

Use `Ipv4Addr::from<[u8; 4]>` when possible

view details

Esteban Küber

commit sha 95e56051088e5c03cd5c5146739bd6b783d61445

Suggest `?Sized` when applicable for ADTs Fix #71790.

view details

Esteban Küber

commit sha d2b8e6090cb694898d4481f4a55d5489fa4b279e

Account for derived obligations to suggest `?Sized` bound Fix #27964.

view details

oddg

commit sha f3dfe80ee1d13ec923082487e73c6d5d5833eef0

Adjust error message

view details

bors

commit sha c8a9c340de32cb70c8bad8af1a4474f805c5a969

Auto merge of #72962 - lcnr:ObligationCause-lrc, r=ecstatic-morse store `ObligationCause` on the heap Stores `ObligationCause` on the heap using an `Rc`. This PR trades off some transient memory allocations to reduce the size of–and thus the number of instructions required to memcpy–a few widely used data structures in trait solving.

view details

Ralf Jung

commit sha 0265e4e61bcd51b11f0b13b712245feb9c59ab50

add tracking issue

view details

Ralf Jung

commit sha 5fbef22a443e42f8661c9e88426ac80b9bc49674

warn against 'specialization' feature

view details

Ralf Jung

commit sha 0bcefd9b5e68eb3a026843ed7b624761bea2de1e

remove visit_terminator_kind from MIR visitor

view details

Ralf Jung

commit sha 302fb5039b6434ac1be617d3f4ac2863cf9ecfb1

get rid of an unused 'span' field

view details

David Wood

commit sha 93022be9917a472f7a16410ce7cb2b76a5d3afdd

bootstrap: read config from $RUST_BOOTSTRAP_CONFIG This commit modifies bootstrap so that `config.toml` is read first from `RUST_BOOTSTRAP_CONFIG`, then `--config` and finally `config.toml` in the current directory. This is a subjective change, intended to improve the ergnomics when using "development shells" for rustc development (for example, using tools such as Nix) which set environment variables to ensure a reproducible environment (these development shells can then be version controlled). By optionally reading `config.toml` from an environment variable, a `config.toml` can be defined in the development shell and a path to it exposed in the `RUST_BOOTSTRAP_CONFIG` environment variable - avoiding the need to manually symlink the contents of this file to `config.toml` in the working directory. Signed-off-by: David Wood <david@davidtw.co>

view details

Ralf Jung

commit sha 046165a80729a22b9692614a658f105d833bfc8d

rename location field of Drop terminators to place

view details

Ralf Jung

commit sha 6c5345f2defa99fd8fef8940f682fe2b6c6249f9

fmt; make visit_terminator arg names consistent with the rest

view details

push time in 3 months

pull request commentrust-lang/rust

Avoid "whitelist"

Thanks, updated per suggestions.

tamird

comment created time in 3 months

push eventtamird/rust

Tamir Duberstein

commit sha 4207abca3f696409d083df5a7c1bd1c90790f86c

Avoid "whitelist" Other terms are more inclusive and precise.

view details

push time in 3 months

Pull request review commentrust-lang/rust

Avoid "whitelist"

 impl<'a, 'tcx> SimilarNamesLocalVisitor<'a, 'tcx> { // this list contains lists of names that are allowed to be similar // the assumption is that no name is ever contained in multiple lists. #[rustfmt::skip]-const WHITELIST: &[&[&str]] = &[+const EXEMPTIONS: &[&[&str]] = &[

Good point; done.

tamird

comment created time in 3 months

pull request commentrust-lang/rust

Avoid "whitelist"

@ratijas none of "blocklist", "denylist", "allowlist" are present in this change nor in the other change (#74150).

tamird

comment created time in 3 months

pull request commentrust-lang/rust

Avoid "whitelist"

@ritobanrc I agree that "allowlist" is not a good term, and it has been expunged from this PR.

tamird

comment created time in 3 months

push eventtamird/rust

Tamir Duberstein

commit sha 9a5714db6b6a162e174803a31db97ab53a396d42

Avoid "whitelist" Other terms are more inclusive and precise.

view details

push time in 3 months

pull request commentrust-lang/rust

Avoid "blacklist"

Done, thanks @nikomatsakis!

tamird

comment created time in 3 months

push eventtamird/rust

Tamir Duberstein

commit sha 1e567c11686f20b4e7422ba9cc0f1eac45e9c9fb

Avoid "blacklist" Other terms are more inclusive and precise. Clippy still has a lint named "blacklisted-name", but renaming it would be a breaking change, so is left for future work. The target configuration option "abi-blacklist" has been depreciated and renamed to "unsupported-abis". The old name continues to work.

view details

push time in 3 months

push eventtamird/rust

Tamir Duberstein

commit sha 42ef20ebe7b53f042136326892e4c028b2bbbfef

Avoid "whitelist" Other terms are more inclusive and precise.

view details

push time in 3 months

push eventtamird/rust

Tamir Duberstein

commit sha 725fd0c9b668e9d975d63e1bb04ce8cc168d4e97

Avoid "whitelist" Other terms are more inclusive and precise.

view details

push time in 3 months

push eventtamird/rust

Tamir Duberstein

commit sha d89a38c82206e1acd25f3879137fef736b85c6b4

Avoid "whitelist" Other terms are more inclusive and precise.

view details

push time in 3 months

pull request commentrust-lang/rust

Use "blocklist" instead of "blacklist"

Implemented all the suggestions. Thanks for the reviews!

tamird

comment created time in 3 months

push eventtamird/rust

Tamir Duberstein

commit sha a12037b76bfec6cdc0656c872f3d157d46078750

Avoid "blacklist" Other terms are more inclusive and precise. Clippy still has a lint named "blacklisted-name", but renaming it would be a breaking change, so is left for future work.

view details

push time in 3 months

push eventtamird/rust

Tamir Duberstein

commit sha 8081312442a5c08a57a1acc66214a8cf3113377c

Avoid "whitelist" Other terms are more inclusive and precise.

view details

push time in 3 months

push eventtamird/rust

Eric Huss

commit sha 561d5acb9e6a968be8532a50611e9aa41e25a001

Fix occasional bootstrap panic in docs.

view details

bors

commit sha 1d919c9377f4602d991ca1c7ba852e7555943740

Auto merge of #74124 - ehuss:fix-doc-dry-run-up-to-date, r=Mark-Simulacrum Fix occasional bootstrap panic in docs. I am occasionally running into this panic when running `x.py`: > thread 'main' panicked at 'source "/Users/eric/Proj/rust/rust/build/x86_64-apple-darwin/md-doc/unstable-book" failed to get metadata: No such file or directory (os error 2)', src/build_helper/lib.rs:173:19 I have not been able to figure out the exact sequence of commands that leads to this error (I tried for quite a while to reproduce it). I think it may involve updating my tree, but I am uncertain. An artificial way to trigger it is to build the documentation, and then delete the `md-doc` directory manually. The cause is that bootstrap does a "dry run" before every command, and in this case `up_to_date` panics because the destination exists (`build/x86_64-apple-darwin/doc/unstable-book/index.html `) but the source does not (`build/x86_64-apple-darwin/md-doc/unstable-book`). I am uncertain if it is important that the last line `builder.run(…)` needs to be called during the dry run. This patch seems to fix the issue, though.

view details

Tamir Duberstein

commit sha 2b8657b5fd8a64ca7101c6b76228836a4bd038c9

Avoid "whitelist" Other terms are more inclusive and precise.

view details

push time in 3 months

PR opened rust-lang/rust

Use "blocklist" instead of "blacklist"

This is more inclusive and precise.

Clippy still has a lint named "blacklisted-name", but renaming it would be a breaking change, so is left for future work.

r? @rust-lang/compiler cc @BurntSushi @Manishearth

+91 -91

0 comment

63 changed files

pr created time in 3 months

push eventtamird/rust

Tamir Duberstein

commit sha 23f8cacc8dbd47f2e9b552f6eddf80709bb6a178

Avoid "whitelist" Other terms are more inclusive and precise.

view details

push time in 3 months

push eventtamird/rust

Tamir Duberstein

commit sha 99880e8e9351c8cfda6eba6dcf21f8c7fc82f8db

Avoid "whitelist" Other terms are more inclusive and precise.

view details

push time in 3 months

push eventtamird/rust

Tamir Duberstein

commit sha 41260f2df39840ffe5dfea91bfcd53c76f6cb34b

Use "blocklist" instead of "blacklist" This is more inclusive and precise. Clippy still has a lint named "blacklisted-name", but renaming it would be a breaking change, so is left for future work.

view details

push time in 3 months

create barnchtamird/rust

branch : blocklist

created branch time in 3 months

push eventtamird/rust

Tamir Duberstein

commit sha 401670a0c675cbc99105714e05e9fa1c2ffca047

Avoid "whitelist" Other terms are more inclusive and precise.

view details

push time in 3 months

push eventtamird/rust

Tamir Duberstein

commit sha 8daa312ad746cbc1ff2f07cfc24f909ac85e7902

Avoid "whitelist" Other terms are more inclusive and precise.

view details

push time in 3 months

push eventtamird/rust

Ralf Jung

commit sha 54d95ed25aa45f94b2a3d0a0e3a3323852878ecd

catch InvalidUninitBytes during validation

view details

Ralf Jung

commit sha c3fc4f0420b642a0e0041bb13492df2d4a68ae80

catch errors more locally around read_discriminant

view details

Ralf Jung

commit sha 751b594cc843a28c660a662db1a822a759af9603

const validation: add test for uninit bool

view details

Ralf Jung

commit sha 319c7f77dedf671b01194adb257dbe662c73df32

fmt

view details

Andy Russell

commit sha 792f2dedd7d910d35f91f32aa222b05d91cb0c65

libstd: remove some mutable statics in sys::unix

view details

bors

commit sha e1beee4992ad4b235fc700bf7af1ee86f894ea53

Auto merge of #74059 - RalfJung:miri-uninit-validation, r=oli-obk Miri value validation: fix handling of uninit memory Fixes https://github.com/rust-lang/miri/issues/1456 Fixes https://github.com/rust-lang/miri/issues/1467 r? @oli-obk

view details

bors

commit sha 8ac1525e091d3db28e67adcbbd6db1e1deaa37fb

Auto merge of #74006 - euclio:sys-unix-static-mut, r=oli-obk libstd: remove some mutable statics in sys::unix My understanding is that this achieves the same behavior and performance with safe code.

view details

Tamir Duberstein

commit sha fb18d6b41ee1e4b89406db1171f6b35ee1ab9b2d

Avoid "whitelist" Other terms are more inclusive and precise.

view details

push time in 3 months

pull request commentrust-lang/rust

Use "allowlist" in place of "whitelist"

The "third party config variable" was a comment.

cc @steveklabnik and @nikomatsakis, I guess. The reaction to this PR demonstrates the reason this sort of change should be made sooner rather than later.

tamird

comment created time in 3 months

Pull request review commentrust-lang/rust

Use "allowlist" in place of "whitelist"

 CONFIG_USB_ANNOUNCE_NEW_DEVICES=y CONFIG_USB_DEFAULT_PERSIST=y # CONFIG_USB_DYNAMIC_MINORS is not set # CONFIG_USB_OTG is not set-# CONFIG_USB_OTG_WHITELIST is not set+# CONFIG_USB_OTG_ALLOWLIST is not set

Yeah, this one doesn't make sense. Reverted.

tamird

comment created time in 3 months

push eventtamird/rust

Tamir Duberstein

commit sha f460ddd66a2fed7769fe9c2c7381befd7785f842

Use "allowlist" in place of "whitelist" Allowlist is more inclusive and precise.

view details

push time in 3 months

more